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?
odd_indices_list = 
for lst[i] in lst if i%2 == 0: