Đi đến trình phátĐi đến nội dung chính
  • 5 năm trước
Python program to merge two python dictionaries
Link to all related video in the playlist "Python quick and dirty sample source code"

https://dailymotion.com/playlist/x74cx0

source code

dict_1 = {'a' : 2, 'f': 4, 'c': 6}
dict_2 = {'e' : 7, 'f': 0}
a_dict = dict_1.copy()
a_dict.update(dict_2)
print(a_dict)

Danh mục

📚
Học tập
Bình luận

Được khuyến cáo