Advertisement
here2share

# add_item_to_dict.py

Apr 10th, 2016
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # add_item_to_dict.py
  2.  
  3. data = {
  4.     'item a': 1,
  5.     'item b': 2,}
  6.  
  7. data['item c'] = 3
  8.  
  9. data.update({'item d': 4,'item e': 5,'item f': 6})
  10.  
  11. for i in data.items(): print i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement