Which of the options below could possibly be the output of the following program? D = {1 : [1, 2, 3], 2: (4, 6, 8)} D[1].
Question 1:
Which of the options below could possibly be the output of the following program? D = {1 : [1, 2, 3], 2: (4, 6, 8)} D[1].append(4) print(D[1], end = ) L = list(D[2]) L.append(10) D[2] = tuple(L) print(D[2])
A. [1, 2, 3, 4] [4, 6, 8, 10]
B. [1, 2, 3] (4, 6, 8)
C. [1, 2, 3, 4] TypeError: tuples are immutable
D. [1, 2, 3, 4] (4, 6, 8, 10)
These questions are from this test. Would you like to take a practice test?