The following dictionaries are given: stocks_1 = {‘CDR’: 200.0, ‘PLW’: 420.0} stocks_2 = {’11B’: 510.0, ‘CDR’: 205.5} What will be the result of the following operation? {**stocks_1, **stocks_2}

Questions & AnswersCategory: PythonThe following dictionaries are given: stocks_1 = {‘CDR’: 200.0, ‘PLW’: 420.0} stocks_2 = {’11B’: 510.0, ‘CDR’: 205.5} What will be the result of the following operation? {**stocks_1, **stocks_2}
Lokesh Kumar Staff asked 2 years ago

The following dictionaries are given:

stocks_1 = {'CDR': 200.0, 'PLW': 420.0}
stocks_2 = {'11B': 510.0, 'CDR': 205.5}

What will be the result of the following operation?

{**stocks_1, **stocks_2}

a. {’11B’: 510.0, ‘CDR’: 200.0, ‘CDR’: 205.5, ‘PLW’: 420.0}
b. {’11B’: 510.0, ‘CDR’: 205.5, ‘PLW’: 420.0}
c. {’11B’: 510.0, ‘CDR’: 200.0, ‘PLW’: 420.0}
d. {‘CDR’: 205.5}