Copy a list in Python

In python two approaches can be used to duplicate a list

Approach 1 : Python provides copy function that can duplicate the list

Example :
cars = ["Mercedes Benz","Honda","Audi", "Volkswagen"]
cars.copy()


Output
['Mercedes Benz', 'Honda', 'Audi', 'Volkswagen']


Approach 2: Slicing operator can be used without any arguments on the list

Example :
cars = ["Mercedes Benz","Honda","Audi", "Volkswagen"]
cars[:]


Output
['Mercedes Benz', 'Honda', 'Audi', 'Volkswagen']