Question: Consider the Python object z = { 1 : 'one', 2 : 'two', 3 : 'three' } ( a ) What kind of object is

Consider the Python object
z ={1: 'one', 2: 'two', 3: 'three'}
(a) What kind of object is z? What is its length?
(b) Which components are keys? Which are values?
(c) How would I get the value associated with the key 2?
(d) Use Jupyters help facilities to figure out what z.keys() does. Ditto z.values(). Try them to verify.
(e) What does list(z.keys()) do?
(f) What does list(z.values()) do?
(g) What does list(z) do?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!