What will be the output of `sorted({'b': 2, 'a': 1})`?
Correct answer
['a', 'b']
Explanation
`sorted()` returns the sorted list of dictionary keys.
Update: Admin added a tag on this question
Topics
By Admin · · 31 views