English

Consider the following dictionaries, D and D1: D={"Suman": 40, "Raj":55, "Raman":60} D1={"Aditi":30, "Amit":90,"Raj":20} (Answer using built-in Python functions only) Write a statement to append - Computer Science (Python)

Advertisements
Advertisements

Question

Consider the following dictionaries, D and D1:

D={"Suman": 40, "Raj":55, "Raman":60}
D1={"Aditi":30, "Amit":90,"Raj":20}

(Answer using built-in Python functions only)

Write a statement to append all the key-value pairs of the dictionary D to the dictionary D1.

Code Writing
Advertisements

Solution

D1.update(D)
shaalaa.com
  Is there an error in this question or solution?

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×