A

Admin • 833.24K Points
Coach

Q. What will `dict.fromkeys('abc', 0)` return?

  • (A) {'a': 0, 'b': 0, 'c': 0}
  • (B) {'abc': 0}
  • (C) ['a', 'b', 'c']
  • (D) Error

Explanation by: Admin

`fromkeys()` creates a dictionary with keys from the iterable and all values set to 0.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.