Skip to main content

All Questions

2 votes
4 answers
1k views

Sorting tuples with a custom sorting function using a range?

I would like to sort a list of tuples based on the two last columns: mylist = [(33, 36, 84), (34, 37, 656), (23, 38, 42)] I know I can do this like: final = sorted(mylist, key:...
Cocomico's user avatar
  • 898