0

What is the difference between these two methods in python? Shouldn't the outcome for list2 be exactly the same?

Method 1:

list2= [[[], [], []], [[], [], []], [[], [], []], [[], [], []], [[], [], []]]

Method 2:

list1 = [[], [], []]
list2 = []
for i in range(5):
    list2_task.append(list1)
al fa
  • 1

0 Answers0