Please help. not sure what to do


prices = {'banana':4,'apple':2,'orange':1.5,'pear':3}
stock ={'banana':6,'apple':0, 'orange': 32, 'pear':15}
for key in prices:
    print apple
    print price:2
    print stock:0


we are looping over the dictionary here:

for key in prices:

now key will be assigned all keys (banana, apple and so on) in dictionary

so to print the product we can print key

then we can use key (loop iterator) as key to get values from prices and stock dictionary to get the price and stock numbers

then we need to display this information nicely with price: and stock: string to get a nice overview of a product, the price and stock of this product


thanks for the help all solved now