Python 3.4 - Dictionary Multiple Key Sort

You can sort data and use it for different purposes:

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

Popular posts from this blog

Pyhton 3.4 - Continue

Conversations Ongoing: Valuing Modernization in Early European History

Conversations Ongoing: A Bunch of Amateurs