What is the output of the following Python code?
x = [1, 2, 3]
y = x
y += [4]
z = x + [5]
print(x, z)- A[1, 2, 3, 4] [1, 2, 3, 4, 5]
- B[1, 2, 3, 4] [1, 2, 3, 5]
- C[1, 2, 3] [1, 2, 3, 5]
- D[1, 2, 3] [1, 2, 3, 4, 5]
Correct answer: A
What is the output of the following Python code?
x = [1, 2, 3]
y = x
y += [4]
z = x + [5]
print(x, z)