🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Dictionaries: all 15 questions

Quiz: Python Dictionaries · Question 3 of 15

Which CANNOT be a dictionary key?

Which CANNOT be a dictionary key?

  1. A."name"
  2. B.42
  3. C.(1, 2)
  4. D.[1, 2]
Answer & explanation

Correct answer: [1, 2]

Keys must be immutable. A list is mutable, so it can't be a key.

Can you get the rest right without peeking?

Take the timed Quiz: Python Dictionaries quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →