This post was updated 835 days ago and some of the ideas may be out of date.

user = {'username':'admin', 'name':'LinFei'}

# 通过in判断
print('name' in user)
print('name' in user.keys())