字典遍历实例

#!/usr/bin/python

l={1:'a',2:'b',3:'c',4:'d'}

print 'i','\t','h'

for i,h in l.items():

   print i,'\t',h

打印结果

你可能感兴趣的:(python字典遍历实例)