CBSE Class 11 Informatics Practices Question 47 of 66

Dictionary — Question 19

Back to all questions
19
Question

Question 9

What type of objects can be used as keys in dictionaries?

Answer

Keys of a dictionary must be of immutable types such as

  1. a Python string
  2. a number
  3. a tuple (containing only immutable entries)