Web Analytics

Python list.copy() Method

List Method โ€ข Copy

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

Equivalent to a[:].

Syntax

list.copy()

Parameters

No parameters.

Return Value

A list object.

Example

Using the copy() method:

Output
Click Run to execute your code

Related Functions