In this example we will show how to access the list items by specifying an index range that omits the end value in Python.
Source Code
my_list = ['a', 'b', 'c', 'd', 'e']
print(my_list[1:])
Output:
['b', 'c', 'd', 'e']
In this example we will show how to access the list items by specifying an index range that omits the end value in Python.
my_list = ['a', 'b', 'c', 'd', 'e']
print(my_list[1:])
Output:
['b', 'c', 'd', 'e']