Q. Assume each of the following lines is entered in the IDLE shell one at a time. Circle any of the lines that produces an error. If no errors are found then write what is printed (from a and b).


a = [[[1, 2, 3, 4, 5], [6,7,8]],9]
a[-1] = 200
b = a[:]
b[0][0][3] = 17
print(a)
print(b)

Answer :-

Output :-

a = [[[1, 2, 3, 17, 5], [6, 7, 8]], 200]
b = [[[1, 2, 3, 17, 5], [6, 7, 8]], 200]
>>>

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post