Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # List Sorting
- a = [(0, 2), (4, 3), (9, 9), (10, -1)]
- print(sorted(a, key = lambda x: x[1])) # [(10, -1), (0, 2), (4, 3), (9, 9)]
- # sorted_list = (sorted(albums, key = lambda x: x["Artist"], reverse = True))
- # student_info.sort(key=lambda x: x['last name'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement