return elemnts of list using index number code example
Example 1: python get index and value from list
test = [ 'test 1', 'test 2', 'test 3' ]
for index, value in enumerate( test ):
print( index, value )
Example 2: get index of all element in list python
indices = [i for i, x in enumerate(my_list) if x == "whatever"]