Write a Python program that concatenates following dictionaries into a new one dictionary
Python Python Dictionary (Article) Python Dictionary (Program)
154Program:
dictionaryl= {1:20, 4:40} dictionary2= {6:60, 8:80} dictionary3= {10:100, 12:120} dictionary4 = {} for d in (dictionaryl, dictionary2, dictionary3): dictionary4.update(d) print(dictionary4)
Output:
{1: 20, 4: 40, 6: 60, 8: 80, 10: 100, 12: 120}
Explanation:
This Particular section is dedicated to Programs only. If you want learn more about Python. Then you can visit below links to get more depth on this subject.