English

Given the following dictionaries. dict_exam={"Exam":"AISSCE", "Year":2023} dict_result={"Total":500, "Pass_Marks":165} Which statement will merge the contents of both dictionaries?

Advertisements
Advertisements

Question

Given the following dictionaries.

dict_exam={"Exam":"AISSCE", "Year":2023}
dict_result={"Total":500, "Pass_Marks":165}

Which statement will merge the contents of both dictionaries?

Options

  • dict_exam.update(dict_result)
  • dict_exam + dict_result
  • dict_exam.add(dict_result)
  • dict_exam.merge(dict_result)
MCQ
Advertisements

Solution

dict_exam.update(dict_result)
shaalaa.com
The Pickle Module in Python
  Is there an error in this question or solution?
2022-2023 (March) Sample
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×