Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to copy list python

new_list = old_list.copy()
# Above new_list does not get affected when modifying old_list
new_list = old_list
#Here new_list is also affected if any modifications are made to old_list
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #copy #list #python
ADD COMMENT
Topic
Name
6+6 =