VT
Size: a a a
VT
VA
VT
VT
VT
VA
VT
VA
py3
s = {"c": 1, "a": 2, "b": 3}
print(sorted(s))['a', 'b', 'c']
VA
VT
VA
py3
s = {"c": 1, "a": 2, "b": 3}
print(sorted(s, key=lambda a: s[a]))['c', 'a', 'b']
VT
VT
VT
VT
VT
VA
py3
import operator
s = {"c": 1, "a": 2, "b": 3}
print(sorted(s, key=s.get))
['c', 'a', 'b']
VT
VA
py3
import operator
s = {"c": 1, "a": 2, "b": 3}
print(sorted(s, key=s.get, reverse=True))
['b', 'a', 'c']
VT