📜  如何在python代码示例中打印字典的所有元素

📅  最后修改于: 2022-03-11 14:45:32.585000             🧑  作者: Mango

代码示例3
my_dict = {"one": 1,"two":2,"three":3,"four":4}

for item in my_dict:
    print("Key : {} , Value : {}".format(item,my_dict[item]))
    
# it will give this result >>>    Key : One , value : 1
#                                 Key : two , value : 2 ....