Question: 1 Write fragments of Python code for the following: (a) You have a dictionary, D={'a':100}. Add a new component with key 'b' and value 200

1 Write fragments of Python code for the following: (a) You have a dictionary, D={'a':100}. Add a new component with key 'b' and value 200 (b) You have a dictionary D={'b":200, 'a':100}. Remove the component with value 200. (c) You have a list, L=[100]. Add a new component with value 200. (d) You have a list, L=[100, 200). Delete the component with value 200. (e) You have a tuple, T=(100, 200,300). Unpack T into three separate components, a, b, and c. pyz047
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
