Since I love dict, number #4 could be one liner like this 🚀
defmerge(dic1,dic2):return{**dic1,**dic2}dic1={1:"Hello",2:"Dev"}dic2={2:"Python",4:"Programming"}# In these examples, Python merges dictionary keys
# in the order listed in the expression, overwriting
# duplicates from left to right.
merge(dic1,dic2)# {1: 'Hello', 2: 'Python', 4: 'Programming'}
Since I love dict, number #4 could be one liner like this 🚀
A very beautiful option) Thanks. I'll replace this if you don't mind)
I'll be honoured ✌