Python Programming - Dictionaries - Discussion

Discussion Forum : Dictionaries - General Questions (Q.No. 18)
18.
How do you merge two dictionaries and create a new one?
dict.merge(another_dict)
dict.join(another_dict)
{**dict, **another_dict}
dict.combine(another_dict)
Answer: Option
Explanation:
Using the syntax {**dict, **another_dict} allows you to merge two dictionaries and create a new one.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.