Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Shallow copy in python

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