Using .sort() in Python, how do I sort a 2D list e.g.:
myVar = [['blueberries','fruit','5.20'],['bean sprouts','vegetable','9.25'],['tulip','flower','8.93']]
#added comma
by item e.g.,:
myVar = [['bean sprouts','vegetable','9.25'],['blueberries','fruit','5.20'],['tulip','flower','8.93']]
by price e.g.,:
myVar = [['blueberries','fruit','5.20'],['tulip','flower','8.93'],['bean sprouts','vegetable','9.25']]
where "blueberries, bean sprouts and tulips" are items, "fruit, vegetable and flower" are categories and the floats are prices.
listas a variable as it is an inbuilt function