3.The "in" operator stuck waiting for help


#1



My code is as below, it showed me a error message about "It looks like you did not print out every key in my_dict." But the result tab showed exactly what I expected. So I am confused, plz help me, thx!


my_dict = {
    "Name": "Tony",
    "Age": "twenty_one",
    "Hobby": "programming and biology"
    }
#print my_dict.keys()
#print my_dict.values()

for key in my_dict:
    print key + " " + my_dict[key]


#2

What exercise is this? Can you provide a link?


#3

https://www.codecademy.com/courses/python-beginner-en-KAgt5/0/3?curriculum_id=4f89dab3d788890003000096


#4

Take a look at this quote from instructions:

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


#5

OH! There it is, thx!


#7

You're very welcome.


#8

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