Consider the following Python code with which I add in a new list2 all the items with indices from 1 to 3 of list1:
list2
list1
for ind, obj in enum
If you use enumerate, you do have access to the index:
enumerate
list2 = [x for ind, x in enumerate(list1) if 4>ind>0]