Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Copying a list using deepcopy() in python

import copy
list1 = [[9, 8, 7], [6, 5, 4], [3, 2, 1]]
list2 = copy.deepcopy(list1)
print("Old list:", list1)
print("New list:", list2)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Copying #list #python
ADD COMMENT
Topic
Name
9+3 =