Output: List References and Copies
Interview insights are lockedSee how often this is asked and which companies asked it with Buncho Pro.What is the output of each snippet?
# A
a = [1, 2, 3]; b = a; b.append(4); print(a)
# B
a = [1, 2, 3]; b = a[:]; b.append(4); print(a); print(b)
# C
a = [[0] * 3] * 3; a[0][0] = 1; print(a)
a = [, , ]; (a a[:]); (a == a[:])
x = [, , ]; y = x; x = [, , ]; (y)
a = [, , ]; ((a) == (a))