🎙 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 5 of 15

What does len({"a": 1, "a": 2}) return?

What does len({"a": 1, "a": 2}) return?

  1. A.1
  2. B.2
  3. C.3
  4. D.Error
Answer & explanation

Correct answer: 1

Keys are unique. The second "a" replaces the first, leaving one 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 →