中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Python3 字典 update() 方法

Python3 字典 Python3 字典


描述

Python 字典 update() 函數(shù)把字典參數(shù) dict2 的 key/value(鍵/值) 對更新到字典 dict 里。

語法

update() 方法語法:

dict.update(dict2)

參數(shù)

  • dict2 -- 添加到指定字典dict里的字典。

返回值

該方法沒有任何返回值。

實例

以下實例展示了 update()函數(shù)的使用方法:

實例(Python 2.0+)

#!/usr/bin/python3 dict = {'Name': 'Runoob', 'Age': 7} dict2 = {'Sex': 'female' } dict.update(dict2) print ("更新字典 dict : ", dict)

以上實例輸出結果為:

更新字典 dict :  {'Name': 'Runoob', 'Age': 7, 'Sex': 'female'}

Python3 字典 Python3 字典

其他擴展