users = { 'user1': { 'first': 'xiao', 'last': 'ming', 'location': 'shanghai' }, 'user2': { 'first': 'hong', 'last': 'hong', 'location': 'beijing' }, } for username, user_info in users.items(): print('\nUsername: ' + username) full_name = user_info['first'] + ' ' + user_info['last'] location = user_info['location'] print('\t Full name: ' + full_name.title()) print('\tLocation: ' + location.title())