d = {'a': 8, 'b': 2, 'c': 9}
打印 key
for i in d:
print(i)
#打印 value
for i in d.values():
print(i)
打印key以及value
for i in d.items():
print(i)
打印key,value
for i,j in d.items():
print(i,j)
版权归原作者 DN_XIAOXIAO 所有, 如有侵权,请联系我们删除。
d = {'a': 8, 'b': 2, 'c': 9}
for i in d:
print(i)
#打印 value
for i in d.values():
print(i)
for i in d.items():
print(i)
for i,j in d.items():
print(i,j)