copy a 2d array in python

Solutions on MaxInterview for copy a 2d array in python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "copy a 2d array in python"
Kit
19 Jan 2016
1y = [row[:] for row in x]
2
Fabio
09 Oct 2018
1from copy import copy, deepcopy
2y = deepcopy(x)
3