tubeshowcase●1,194,391 videosβ™‘ My collection 0
← Learn to Code

Learn to Code08:21

Python sort πŸ—„οΈ

Bro Code β†—

From the creator

Python sort sorting tutorial example explained #python #sorting #sort # ------------------------------------------------------------------- # sort() method = used with lists # sort() function = used with iterables students = (("Squidward", "F", 60), ("Sandy", "A", 33), ("Patrick","D", 36), ("Spongebob","B", 20), ("Mr.Krabs","C", 78)) grade = lambda grades:grades[1] # students.sort(key=age) # sorts current list sorted_students = sorted(students,key=grade) # sorts and creates a new list for i in sorted_students: print(i) # ------------------------------------------------------------------- music credits 🎼 : =========================================================== Up In My Jam (All Of A Sudden) by - Kubbi https://soundcloud.com/kubbi Creative Commons β€” Attribution-ShareAlike 3.0 Unportedβ€” CC BY-SA 3.0 Free Download / Stream: http://bit.ly/2JnDfCE Music promoted by Audio Library https://youtu.be/tDexBj46oNI ===========================================================

Published 2021-01-18 Β· Watch on YouTube β†—
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code