Advertisement
here2share

# dict_get_value.py

Mar 16th, 2017
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. # dict_get_value.py
  2.  
  3. d = {'r': 2, 'zzz zzz': 9, 'c': 5, 25: 12345, 'this is a string key': 'this is a string value'}
  4.  
  5. print d.get('c')
  6. print d.get('zzz zzz')
  7. print d.get(25)
  8. print d.get('x')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement