I know that copying list with the following code will perform a shallow copy. i.e New list is created.
>>> L = [1,2,3,4,5]
>>> L_copy = L[:]
>>> L_copy
>>>[1, 2, 3, 4, 5]
>>> L_copy is L
False
How is the following code executed:
L[:] = some_list
I saw it in one example.
This is my first question on stackoverflow.