Answers for "copy a 2d array in python"

2

y = [row[:] for row in x]
Posted by: Guest on September-28-2020
1

copy a 2d array in python

from copy import copy, deepcopy
y = deepcopy(x)
Posted by: Guest on August-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language