python循环字典里面的数据和列表差不多,如下:
def zd(obj):
for (k,v) in obj.items():
print(k,':',v)
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
myListZD={'a':'aa','b':'bb','c':'ccc','d':'ds'}
zd(myListZD) 输入如下:
a : aa
b : bb
c : ccc
d : ds