遍历字典的键 字典的遍历可以通过 for 循环来完成 代码如下: dict_demo = { 'Name':'Zara', 'Age': 7} for key in dict_demo.keys(): print(key) 运行结果如下: