Python List copy() Method

Example

Copy the fruits list:

fruits = ['apple', 'banana', 'cherry', 'orange']
x = fruits.copy()

Run Instance

Definition and Usage

The copy() method returns a copy of the specified list.

Syntax

list.copy()

Parameter Value

No parameters.