使用get()方法,也可以获取字典的值dict1 = { "name": "feifei", "gender": "girl", "age": 28}x = dict1.get("age")print(x)执行结果:28