The 'in' Operator


It Says The Following Error Message When I run It:

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

I can't Figure it Out

I expected to print out: For each key in my_dict: print out the key , then a space, then the value stored by that key.

Here Is My Code:

    'Name': 'Bob',
    'Phone': '123-456-7890',
    'e-mail': ''
for key in my_dict:
    print(key, my_dict[key])


using parentheses with print makes it a tuple, don't use parentheses with print in python2


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