0
What is the output of the following Python code?
a = [1, 2, 3, 4, 5]
b = a[::-2]
a[1:3] = [9]
print(b, a)- A[5, 3, 1] [1, 2, 9, 4, 5]
- B[5, 3, 1] [1, 9, 4, 5]
- C[1, 3, 5] [1, 9, 4, 5]
- D[5, 3, 1] [1, 9, 3, 4, 5]
Correct answer: B
What is the output of the following Python code?
a = [1, 2, 3, 4, 5]
b = a[::-2]
a[1:3] = [9]
print(b, a)