dic = {"k1":"v1", "k2":"v2"} for k in dic: print(dic[K]) for k, v in dic.items(): print(k, v)
这两种方法都可以用来遍历的。