Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. ab={    'Keith'  :'thesomethingdumb@gmail.com',
  2.         'Kyle'   :'19letterslong@gmail.com',
  3.         'Schwami':'nschwami@gmail.com',
  4.         'Andy'   :'atshort08@gmail.com'
  5.  
  6. print 'Andy\'s address is' % ab['Andy']
  7.  
  8. ab['Complex/Rockets'] = 'podcast@complexrockets.com'
  9. del ab['Andy']
  10.  
  11.         print '\nThere are %d contacts in the address book\n' % len(ab)
  12.  
  13. for name, address in ab.items():
  14.         print 'Contact %s at %s' % (name, address)
  15. if 'Andy' in ab:
  16.         print '\nAndy\'s address is %s' % ab['Andy']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement