← 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?
- A."name"
- B.42
- C.(1, 2)
- 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 →