KnowledgeBoat Logo

Computer Science

What values can we have in a dictionary?

Python Dictionaries

CBSE

1 Like

Answer

A dictionary can have values of all data types i.e., integers, floats, strings, booleans, sequences and collections, etc. For example:

d = {1:'a' , 2: 2 , 3: True , 4: 3.5 , 5: "python",(1,2,3) : 4}

Answered By

3 Likes


Related Questions