Python two-dimensional list copy problem

Write a program and found that the copy of python two-dimensional list cannot be used directly like one-dimensional

list()

or

copy() function

Need to separate each item using the following code

temp=[cells[i][:] for i in range(len(cells))]

 

Guess you like

Origin blog.csdn.net/mid_Faker/article/details/114340324