Python遍历字典
dict1 = {'name': 'gzy', 'age': 18, 'gender': '男'}
for key in dict1.keys():
print(key)
for value in dict1.values():
print(value)
for (key,value) in dict1.items():
print(f'{key} : {value}')
for item in dict1.items():
print(item)