What values can we have in a dictionary?
1 Like
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
Why are dictionaries called mutable types?
What are different ways of creating dictionaries?
How are individual elements of dictionaries accessed?
How is indexing of a dictionary different from that of a list or a string?