标签:pytho 不可 form name value div python highlight int
#字典的镶嵌 dic={"name":["apple","banana","grape"], "information":{1:"sweet",2:"delisious",3:"sour"}, "hobby":"fruit", "age":18 } print(dic) print(dic["name"][0].upper()) dic["name"].append("red grape") print(dic) dic["age"]=99 print(dic) dic["information"][4]="I like it" print(dic["information"][4]) #字典的K值是不可变数据类型:str,tuple,int,Bool #而value可以是任何的数据类型
标签:pytho 不可 form name value div python highlight int
原文地址:https://www.cnblogs.com/GZ1215-228513-Chichy/p/11320371.html