A

Admin • 831.35K Points
Coach

Q. What will be the output of `len({1: 'a', 2: 'b', 3: 'c', 2: 'd'})`?

  • (A) 4
  • (B) 3
  • (C) 2
  • (D) Error

Explanation by: Admin
Duplicate keys are not allowed; the last value for key 2 is used, so only 3 unique keys.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.