In the dictionary stock[key] and prices[key] appear to be float numbers (e.g. price of oranges is 1.5) not strings. So why don’t we need to wrap stock[key] or prices[key] in str()?
As an example, my code below seems to work, but I don’t understand why:
for key in prices:
print “price: %s” % prices[key]
print “stock: %s” % stock[key]