1. Iterators for Dictionaries


#1



1. Iterators for Dictionaries

Why does it say there is a syntax error at the second " : "

This code should work right?


my_dict = {
    "Name" : "Bob"
    "Age" : 999
    "ISBOB" : True
    }
print my_dict.items()


#2

Because all key: value pairs should be separated by comma, like this:

my_dict = {
    "Name" : "Bob",
    "Age" : 999,
    "ISBOB" : True
}
print my_dict.items()