name = {
    'username': 'zhangsan',
    'first': 'lisi',
    'last': 'wangwu',
    }
for key, value in user.items():  # key 键  ivalue 值 （取键值对）
    print('\nkey:' + key)
    print('value:' + value)
for name in user:
    print(name.title())

friends = ['last','first']
for names in name.keys():   # 取字典中的键
    print('name.title()')
    if names in  friends:
        print('Hi' + names.title() + ', I see your favorite language is' + name[name].title() + '!')

for users in sorted(user.keys()):
    print(users + ', thank you')

for user in name.values():   # 取字典中的值
    print(user)
