I lost a berry


#1


#2

You have to print like this..
EDIT*
key value

print automatically puts space here.
but as it asks to put a space you can use ' ' between them.


#3

Hi there,

Thanks for the input. I tried it, and can't get it to work.

Just this "key value" results in an unrecognized value error. Even adding a comma like this "key, value" does not work either. Also tried this "print key, " ", value"

The code that I currently use, actually prints this out correct, as far as I can tell: "a apple c cherry b berry None", isn't that what the instructions asked for?

Thanks in advance,


#4

Have you used value or d[key] for value?
value is d[key],right ?


#5

d = {'a': 'apple', 'b': 'berry', 'c': 'cherry'}

for key in d:

    print key, d[key]
# Your code here!

#6

try :
print(key + " " + d[key])


#7

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