Unnecessary error?


#1

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?


#2

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


#3

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


#4

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


#5

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