Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # list_sort_arrays_by_indexed_item.py
- data = [(4,5,'fifth'),(0,2,'second'),(1,4,'fourth'),(2,3,'third'),(3,1,'first')]
- data = sorted(data, key = lambda x:x[1])
- for i in data:
- print i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement