Pytho学习_获取字典中的元素

案例:获取字典中的元素 info={"name":"胖子","age":"18","sex":"女","mei":False} print(info) print("姓名为%s"%info["name"]) print("年龄为%s"%info["age"]) print("性别为%s"%info["sex"]) print("美丽否",info.get("mei")) 运行结果:
相关文章
相关标签/搜索