This is as far as I seem to have gotten.
counter = 0
while counter < len(lst):
if lst % 2 == 0:
counter += 1
#Uncomment the lines below when your function is done
#print(delete_starting_evens([4, 8, 10, 11, 12, 15]))
print(delete_starting_evens([4, 8, 10]))
Now from breaking down this while loop, what I’m understanding is my condition is no longer true by the third element. My counter is at 2 while my len of list is 1. Hence exiting the loop. I don’t seem to understand the consideration with iterating. I have tried to increase the len of lst to + 1, and this works on the 3 element list where its even. However, I run into an infinite while loop when I try this with another list.
I now know that my condition is failing but I can’t seem to wrap my head around a solution. Is there something obvious I am missing?
Edit: After looking at the solution, I can see where I went wrong. My logic was somewhat ok, but I was missing a big part of what was causing my empty case to fail. Since the counter was bound to go over the length, I should have been checking if the list had an element in it (>0) as well as if the first element is even. Seems pretty silly looking back at it!