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

Quiz: Tuples and Sets · Question 9 of 15

Why can a tuple be a dictionary key but a list cannot?

Why can a tuple be a dictionary key but a list cannot?

  1. A.Tuples are smaller
  2. B.Tuples are immutable (hashable); lists can change
  3. C.Lists can't hold numbers
  4. D.It's only a convention
Answer & explanation

Correct answer: Tuples are immutable (hashable); lists can change

Keys must not change after insertion.

Can you get the rest right without peeking?

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

Start the quiz →