Python Program to Slice Lists (Get all the Items from One Position to Another Position)
my_list = [1, 2, 3, 4, 5]
print(my_list[2:4])
Output
[3, 4]
my_list = [1, 2, 3, 4, 5]
print(my_list[2:4])
Output
[3, 4]