Continuing in IDLE, assign a dictionary's keys to two variables, and then change one of them like this: d = dict(november=11, oscar=12, papa=13, quebec=14) v1 = v2 = d.keys() v1, v2 # This will show...



Continuing in IDLE, assign a dictionary's keys to two variables, and then


change one of them like this:


d = dict(november=11, oscar=12, papa=13, quebec=14)


v1 = v2 = d.keys()


v1, v2 # This will show the contents of the lists


v1[3] = "X"


After this, do you expect v1 and v2 to be the same or different? Why? Print


out v1 and v2 to see. Now try assigning to v1 and v2 separately, and again


change one:


v1 = d.keys()


v2 = d.keys()


v1[3] = "X"


Will v1 and v2 be the same as before? Print them out to see. If any of this is


mysterious try re-reading the sidebar on page 33.



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here