A

Admin • 833.24K Points
Coach

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

  • (A) ['a', 'b']
  • (B) [1, 2]
  • (C) ['b', 'a']
  • (D) {'a': 1, 'b': 2}

Explanation by: Admin

`sorted()` returns the sorted list of dictionary keys.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.