a = {"name":‘qiliyan‘,‘sex‘:‘man‘} print(tuple(a.keys())) #(‘name‘, ‘sex‘) print(tuple(a.values())) #(‘qiliyan‘, ‘man‘) for key in a.keys(): print(key) #name #sex for value in a.values(): print(value) # qiliyan # man
原文地址:https://www.cnblogs.com/qiaoer1993/p/11077646.html
时间: 2024-10-18 12:01:03