How to Sort a List of Lists in Python

Veröffentlicht am: 18 April 2020
auf dem Kanal: Python Tutorials for Digital Humanities
5,063
70

If you enjoy this video, please subscribe. I provide all my content at no cost. If you want to support my channel, please donate via
PayPal: https://www.paypal.com/cgi-bin/webscr...
Patreon:   / wjbmattingly   (its my www.themedievalworld.com account as well).

If there's a specific video you would like to see or a tutorial series, let me know in the comments and I will try and make it.

If you liked this video, check out www.PythonHumanities.com, where I have Coding Exercises, Lessons, on-site Python shells where you can experiment with code, and a text version of the material discussed here.

###How to sort a list of lists in Python###

data = [
["Jim", 1988],
["Xena", 1940],
["Alexa", 1950],
["Bob", 1977],
["Jerry", 1990],
["Cindy", 1995]
]

data.sort(key=lambda x: x[1])

print (data)


Auf dieser Seite können Sie das Online-Video How to Sort a List of Lists in Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Python Tutorials for Digital Humanities 18 April 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 5,063 Mal angesehen und es wurde von 70 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!