I have a list, my_list:
[['28/02/2014, apples']
['09/07/2014, oranges']
['22/04/2014, bananas']
['14/03/2014, tomatoes']]
which I am trying to order by date. This is the code I am using:
def display(my_list):
for item in my_list:
x = ([item[0] + ": " + item[1]])
print x
I've tried applying different forms of sorting to x (sorted, x.sort(), etc) but nothing seems to work. How can I get the list to sort by date, from earliest to latest?