Slicing a list in Python

In python slicing operator can be used to extract necessary elements from the list, slicing on list takes two optional parameters that controls the data that can be extracted from the list.

Syntax
list[start_index:end_index]

Example 1:
Skip first element and get all other elements from list
cars = ["Mercedes Benz","Honda","Audi", "Volkswagen"]
cars[1:]

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

Example 2:
Get first 2 elements from list
cars = ["Mercedes Benz","Honda","Audi", "Volkswagen"]
cars[:2]

Output
['Mercedes Benz', 'Honda']

Example 3:
Copy list (when no argument is passed to slicing operation, list is copied)
cars = ["Mercedes Benz","Honda","Audi", "Volkswagen"]
cars[:]


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