I don't know why but it saids I'm wrong, that I didn't print all the keys. But I innocently did.

Oops, try again. It looks like you did not print out every key in my_dict.

my_dict = {
    'socks': 3, 
    'Iphone': 'expensive',
    'tis_a_bool': True 
for key in my_dict:
    print key + ' ' + str(my_dict[key])


In the instructions and they even emphasized it:

(You should use print a, b rather than print a + " " + b.)

They are also checking if you are doing key, my_dict[key] or key + ' ' + str(my_dict[key]) (I think). Make sure you are doing the former.


So i do have my print statement in the Print(key, my_dict[key]) and I am still getting this error. All my value are printing normally.


No brackets around key, my_dict[key]. Print needs to be all lowercase to print.


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