Examveda

What is the output of the following code:
my_dict = {'a': 1, 'b': 2}
new_dict = my_dict.copy()
print(new_dict)

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

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

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

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

Answer: Option A


This Question Belongs to Python Program >> Dictionary In Python

Join The Discussion

Related Questions on Dictionary in Python