I'm wondering why a dictionary built by function is in wrong order. It starts from location of the user, not from his first and last name. It is a code from "Python Crash Course" (chapter 8) but SUblime Text prints it like I described. Could some good spirit help me. I'm new in this area.
def build_profile(first, last, **user_info):
"""Builds dictionary with user information"""
user_info['first_name'] = first
user_info['last_name'] = last
return user_info
user_profile = build_profile('albert', 'einstein', location='princeton', field='physics')
print(user_profile)
Result:
{'location': 'princeton', 'field': 'physics', 'first_name': 'albert', 'last_name': 'einstein'}