I have the following situation:
-
I have list_1 with the following values [10,20,30,40]. I want to create a copy of this list, however I need the list_2 not to change when I modify some value in list_1.
-
I have the following code below, but you are not doing what I need.
lista_1 = [10,20,30,40]
lista_2 = lista_1[:]
print (lista_2)
Thank you in advance.