Which method is used to update a dictionary with elements from another dictionary or iterable?
-
A
update()
Correct answer
-
B
merge()
-
C
append()
-
D
extend()
Correct answer
A. update()
12 views
Explanation
The update() method updates a dictionary with elements from another dictionary or iterable.
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ