CBSE Class 11 Computer Science Question 3 of 112

Dictionaries — Question 3

Back to all questions
3
Question

Question 3

What values can we have in a dictionary?

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}