Resolved: Advanced Topics in Python: the 'in' operator


I'm trying to resolve exercise number 3 in the section "Advanced topics: the 'in' operator".


My code is:

my_dict = {
"Name" : "John",
"Surname" : "Smith"

for i in my_dict:
print "%s %s" % (i, my_dict[i])

I obtain this error: Oops, try again.
It looks like you did not print out every key in my_dict.

The console return the right data and I can't understand this error.
I tried the code on the python environment and it works properly.


it is SCT (submission correctness test), that you use "%s %s" % (i, my_dict[i]) instead of just simply doing:

print i, my_dict[i]

both are correct, but you can only use this one to pass the exercise


Many thanks for your help!