dictionary sort and print code example
Example: sort a dictionary
from operator import itemgetter
new_dict = sorted(data.items(), key=itemgetter(1))
from operator import itemgetter
new_dict = sorted(data.items(), key=itemgetter(1))