lambda sort code example
Example 1: sorted python lambda
lst = [('candy','30','100'), ('apple','10','200'), ('baby','20','300')]
lst.sort(key=lambda x:x[1])
print(lst)
Example 2: python sort based off lambda
a = sorted(a, key=lambda x: x.modified, reverse=True)
Example 3: sorted lambda
sorted(student_tuples, key=lambda student: student[2])