Am getting an error about the the “Orange key”


#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)

Am getting an error about the the “Orange key” despite the fact that the key printed to screen


FAQ: Learn Python: A Day at the Supermarket - Keeping Track of the Produce
#2

This exercise has only one error message for all situations.

Try using the Python 2 print statement syntax (no parens) and see if that works.


#3

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