Hello there

I am going through the Python course and I have a question regarding the exercise:

Create a function named `odd_indices`

that has one parameter named `lst`

. The function should create a new empty list and add every element from `lst`

that has an odd index. The function should then return this new list.

I wrote the following code (which of course doesnâ€™t work). My question is: why?

def odd_indices(lst):

odd_indices_list = []

for lst[i] in lst if i%2 == 0:

odd_indices_list.append(lst[i])

return odd_indices_list