Create dictionary


  • We can also start with a dictionary that already has some data in it.


examples/dictionary/create_dictionary.py

user = {
   'fname': 'Foo',
   'lname': 'Bar',
}

print(user)   # {'lname': 'Bar', 'fname': 'Foo'}

user['email'] = 'foo@bar.com'