python dictionary的遍历 d = {'x':1, 'y':3, 'z':2} for k in d: print d[k] 直接遍历k in d的话,遍历的是dictionary的keys。 2 字典的键可以是任何不可变类型