What is the output of print(sorted({'a': 3, 'b': 1, 'c': 2}.values())) in Python?
print(sorted({'a': 3, 'b': 1, 'c': 2}.values()))
Correct answer
C. [1, 2, 3]
6 views
C. [1, 2, 3]
6 views
Sorting the values of a dictionary.
Asked in: Python Interview Dictionaries
https://docs.python.org/3/tutorial/datastructures.html#dictionariesNot sure why the answer is C? Ask here and get an explanation.