$ ./guess_the_language
Problem Solving — predict the output
Problem Solving — predict the output · medium · #32
What is printed?
a = [1, 2, 3] b = a b.append(4) print(a)
[1, 2, 3]
[4]
[1, 2, 3, 4]
[1, 2, 3, [4]]
b and a reference the same list, so a sees the append.
Play Problem Solving ▸
◂ #31
all Problem Solving — predict the output questions
#33 ▸