This may be trivial for some but I have trouble looking through 2d array(?) in Python.
orderList = [ ('apples', 2.0), ('pears', 3.0), ('limes', 4.0) ]
How do I loop through this list? I’ve tried this but obviously it’s not working.
for item in orderList:
print item;
**If you can direct me to a tutorial or website that has this information, I will be content.
You can use tuple unpacking to loop through everything:
You could also do this from inside of the
forloop: