CBSE Class 11 Computer Science Question 64 of 112

Dictionaries — Question 4

Back to all questions
4
Question

Question 4

What all types of values can you store in :

  1. dictionary-values ?
  2. dictionary-keys ?
Answer
  1. Dictionary values can be all the data types of Python including collections and sequences.
  2. Dictionary keys must be of immutable types like a string, a number, a tuple (containing only immutable entries).