Açıklama Yok

user_profile.py 459B

1234567891011121314
  1. def build_profile(first, last, **user_info):
  2. """Build a dictionary containing everything we know about a user."""
  3. profile = {}
  4. profile['first_name'] = first
  5. profile['last_name'] = last
  6. for key, value in user_info.items():
  7. profile[key] = value
  8. return profile
  9. user_profile = build_profile('albert', 'einstein',
  10. location='princeton',
  11. field='physics')
  12. print(user_profile)