python 遍历字典

遍历字典

dict1 = dict(a=1,b='Thank you',c=3)
for k,v in dict1.iteritems():
    print k,v, #输出 a 1 b Thank you c 3
原文地址:https://www.cnblogs.com/artesian0526/p/9294015.html