I too got the same problem


#1

Continuing the discussion from Keeping track of the produce: I'm not sure why my code works:

Continuing the discussion from Keeping track of the produce: I'm not sure why my code works:



My code is same like tchallavii and it says my code got a problem even though I got output. 
And also my output is coming in order starting with bananas


#2

You have to reformat your post with your code andI the problem You have


#3

prices = {'banana':4, 'apple': 2, 'orange': 1.5, 'pear': 3}
stock = {'banana': 6, 'apple': 0, 'orange': 32, 'pear': 15}
for fruit in prices:
print fruit
print 'price: %s' %prices[fruit]
print 'stock: %s\n' %stock[fruit]


#4

Remove new line character \n from last line.


#5

Okay. Thank you very much!