Facebook Page Twitter Page LinkedIn Page
× Python Tutorial Python Advanced Python Resources Python Libraries


The Python list copy() method is used to copy the entire list into a new list.

Syntax

list.copy()

Parameters

No parameter is required.

Return Value

Returns a copy of the specified list.

Example:

In the below example, list copy() method is used to copy the list called MyList into the list called NewList.

MyList = ['Red', 'Blue', 'Green']
NewList = MyList.copy()
print(NewList)

The output of the above code will be:

['Red', 'Blue', 'Green'] 

❮ Python List Methods




5