Sobes.tech
Junior — Senior

Display list after modifying the original array

livecode

Task condition

Determine which output will appear on the screen after executing the given code. Answer options:

  • [1, 2, 3]
  • [1, 1, 1]
  • [10, 2, 3]
  • [10, 2, 3, 1, 2, 3]
data = [1, 2, 3]
new_data = data * 1
data[0] = 10
print(new_data)