Python List copy() Method - Syntax & Examples - Make a Shallow Copy of List in Python

Опубликовано: 02 Июль 2024
на канале: ProgramGuru
19
5

Python List copy() method:
copy() method makes a shallow copy of the list and returns the copied list as a new list.

Syntax
======
The syntax of copy() method is:
list.copy()
Consider a list of items with some items in the list.
When we call copy() method on this list, the method creates a new list with the items of the original list, and returns the new list.