MCQ Single Best Answer Not Set

QWhat will be the output after the following statements?
import copy
x = [5, 4, 3, 2, 1]
y = [7, 8, 9]
z = [x, y]
a = copy.copy(z)
x[2] = 6
print(a)

ID: #4020 Python Module MCQ 283 views
Question Info
#4020Q ID
Not SetDifficulty
Python Module MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A [[5, 4, 3, 2, 1], [7, 8, 9]]
  • B [[5, 4, 6, 2, 1], [7, 8, 9]]
  • C [5, 4, 6, 3, 2, 1]
  • D [5, 4, 6, 2, 1, 7, 8, 9]
Correct Answer: Option B

Explanation

[[5, 4, 6, 2, 1], [7, 8, 9]]

Share This Question

Challenge a friend or share with your study group.