Back

Python

Created 12 mons ago
101 Views
3 Comments
SHIVANSHjMoevn
@SHIVANSHjMoevn
SHIVANSHjMoevn
@SHIVANSHjMoevnProfile is locked. Login


                                         

You are required to write a Python program to merge two dictionaries into a new dictionary.

Input:

The input will consist of two dictionaries, each containing distinct keys.

Output:

Return a new dictionary that contains all the key-value pairs from both input dictionaries.

Sample Input:

{'a': 1, 'b': 2}

{'c': 3, 'd': 4}

Sample Output:

{'a': 1, 'b': 2, 'c': 3, 'd': 4}

I tried all the method of running the above code but it is showing one or more private test cases failed. Please look into this matter!!!

I am not able to access the python zero to hero course advanced module due to the above problem.


Comments (3)
Please login to comment.