Hi, it works, but I can not imagine how does it do it exactly.
Why my new variable related to the dictionary (fruit) sometimes is printed as a name (print fruit) and sometimes as a related value (print “price: %s” % prices[fruit])?
And why it does not print all fruits first, then all prices second, then all stocks third but instead it prints first fruit-price-stock combination, then second combination and so on?
for fruit in prices:
print “price: %s” % prices[fruit]
print “stock: %s” % stock[fruit]