Unnecessary error?


prices ={
"banana" : 4,
"apple" : 2,
"orange": 1.5,
"pear" :3

stock ={
"banana" : 6,
"apple" : 0,
"orange": 32,
"pear" :15

for key in prices:
print key
print "price : %s" % prices[key]
print "stock: %s" % stock[key]

it gives error for orange ..i really do not understand why?


the output needs to be an exact match, you have a unnecessary space between price and :


ohh thanks , got it right now. Is there any reason to make editor so over fit to ideal answer?


well, because its says in the instructions it wants an exact match, its only valid if it is an exact match.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.