r/PythonLearning • u/Sea-Ad7805 • Aug 29 '25
Copying Objects
See the Solution and Explanation, or see more exercises.
1
Upvotes
r/PythonLearning • u/Sea-Ad7805 • Aug 29 '25
See the Solution and Explanation, or see more exercises.
2
u/Sea-Ad7805 Aug 29 '25
Always good to fix these little blind spots. As 'a' is a list copy.copy(a), a.copy(), list(a), a[:], a[::] are all shallow copies.