examples/dictionary/exists.py
from __future__ import print_function

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

print('fname' in user)  # True
print('email' in user)  # False
print('Foo' in user)    # False

k = 'email'
if k in user:
   print(user[k])
examples/dictionary/in_values.py
#!/usr/bin/env python

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

print 'fname' in user.values()  # False
print 'Foo' in user.values()    # True