Note: If you only wish to access the values without changing them, then use the read only loop,
for value in the_list:
Then we don’t need to mess around with the indices. We only need the index if we wish to mutate that element’s value.
What you have in the first post is still a valid approach except there is no index 4 or 5 in the numbers, only
0, 1, and 2. The range based on list length is that sequence. TBH, I glanced over it too fast to see what you were actually doing.
num = range(len(numbers)) => [0, 1, 2]
Accessing by a list of indices is something we may find ourselves doing in a large list where we have located the indices of a subset of values from the list.
Say we have a long list of numbers and we want the index of every number that is a multiple of 4. We would run an algorithm to ferret out the values and store their index, and then we can later access only those values in the larger list.
numbers = [1,11,12,15,16,25,28,31,36,41,44,53,56]
nums = 
for i in range(len(numbers)):
if numbers[i] % 4 == 0:
for i in nums:
print (numbers[i], end=", ")
# 12, 16, 28, 36, 44, 56,