标签:number count class min int highlight ati mil mini
定义字典
familyinfo = { "family name":"Python", "family structure":[ {"name":"Taro", "age":32, "sex":"male"}, {"name":"Hanako", "age":31, "sex":"female"}, {"name":"Ichiro", "age":5, "sex":"male"} ], "address":[ {"country":"Japan"}, {"administrative_area":"Tokyo"}, {"locality":"Chuohku"} ], "phone number":"03-0000-0000" }
想要打印“Taro”的话
print(familyinfo["family structure"][0]["name"])
标签:number count class min int highlight ati mil mini
原文地址:https://www.cnblogs.com/niulang/p/12881323.html