← 返回列表

Python3 字典 Update 方法

Python3 字典 Update 方法 #!/usr/bin/python3 dict = {'Name': 'Zara', 'Age': 7} dict2 = {'Sex': 'female' } dict.update(dict2) print ("updated dict : ", dict)

Python3 字典 Update 方法

#!/usr/bin/python3

dict = {'Name': 'Zara', 'Age': 7}
dict2 = {'Sex': 'female' }

dict.update(dict2)
print ("updated dict : ", dict)

打开资源 ↗

交流与评论