python sort dictionary by second value in tuple code example
Example: Python sort dictionary by value
from operator import itemgetter
new_dict = sorted(data.items(), key=itemgetter(1))
from operator import itemgetter
new_dict = sorted(data.items(), key=itemgetter(1))