4. Given below are statements for creating a list and dictionary. Find errors, if any, 2
and rewrite the correct statements.
a. L1 = k, 10, 4, z
b. L1 = ( [0, 1, 2, 3 ] [ ‘my’ , ‘book’] )
c. d1 = {1 : 10, 2.6 : 20, 3 : 30, 4 : 40, 5 : 50}
d. d1 (7) = 70
Answers
Answered by
1
L1 = [10, 4]
L1 = [[0, 1, 2, 3], ["my", "book"]]
d1 = {1 : 10, 2.6 : 20, 3 : 30, 4 : 40, 5 : 50}
d1[7] = 70
Similar questions