Question: use Syder to execute the Python code and answer the questions Code: adict = {'a': 1, 'b': 2, 'c': 3, 4:'d'} adict['a'] = 'A' print(adict)
use Syder to execute the Python code and answer the questions
Code: adict = {'a': 1, 'b': 2, 'c': 3, 4:'d'} adict['a'] = 'A' print(adict) adict['x'] = [1, 2, 3] print(adict) print(len(adict))
Questions: What happens to a dictionary when an existing key is reused? What happens when a non-existing key is used? Why can the len() function be used with dictionaries?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
