The function sorted can sort also a list of lists / list of tuples.
If you want to sort the content of the tuples, you can make a new list. You can use a list comprehension.
The first example sorts the content of the list.
The second example keeps the order of the list and sorts the content of the tuples.
If you want to sort the content of the tuples, you can make a new list. You can use a list comprehension.
The first example sorts the content of the list.
The second example keeps the order of the list and sorts the content of the tuples.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!