Checkpoint 15.9.1.
- 23
- mydict and yourdict are both names for the same dictionary.
- None
- The dictionary is mutable so changes can be made to the keys and values.
- 999
- Yes, since yourdict is an alias for mydict, the value for the key elephant has been changed.
- Error, there are two different keys named elephant.
- There is only one dictionary with only one key named elephant. The dictionary has two different names, mydict and yourdict.
What is printed by the following statements?
mydict = {"cat":12, "dog":6, "elephant":23, "bear":20}
yourdict = mydict
yourdict["elephant"] = 999
print(mydict["elephant"])