Last updated 3 years ago
Was this helpful?
All slice operations return a new list containing the requested elements. This means that the following slice returns a shallow copy of the list:>>>
>>> squares[:] [1, 4, 9, 16, 25]
https://docs.python.org/3/tutorial/introduction.html