Python 3.4 - Dictionary Multiple Key Sort
You can sort data and use it for different purposes:
https://www.youtube.com/watch?v=avthXghx0a0
from operator import itemgetter user = {'fname': 'Matt', 'lname': 'Fassnacht'}, {'fname': 'Jim', 'lname': 'Fassnacht'} for x in sorted(user, key=itemgetter('fname')): print(x)
https://www.youtube.com/watch?v=avthXghx0a0
Comments