python3.5以降なら
d1 = {'one':1, 'two':2}
d2 = {'two':'ii', 'three':'iii'}
d3 = {'three':'III', 'four':'IV'}
d4 = {**d1, **d2, **d3}
python3.9以降なら
| という演算子で、2つの辞書型を連結できるらしい |
ランキング参加中です
↓クリックしていただけると嬉しいです〜
python3.5以降なら
d1 = {'one':1, 'two':2}
d2 = {'two':'ii', 'three':'iii'}
d3 = {'three':'III', 'four':'IV'}
d4 = {**d1, **d2, **d3}
python3.9以降なら
| という演算子で、2つの辞書型を連結できるらしい |
↓クリックしていただけると嬉しいです〜