dic={‘name‘:‘alan‘,‘age‘:12,‘city‘:‘canton‘}
for i in dic:
print(i,dic[i])
for i in dic.items():
print(i)
for items in dict.items():
print(items)
for key,value in dict.items():
print(key,value)
for i in dict:
print(i,dict[i])
原文:https://www.cnblogs.com/alansuny/p/12437358.html