You can download this code by clicking the button below.
This code is now available for download.
Sorts a list of tuples based on the first element of each tuple and returns the sorted list.
Technology Stack : sorted, lambda expression
Code Type : Function
Code Difficulty : Intermediate
def acesort(iterable):
return sorted(iterable, key=lambda x: x[0])