This exercise wants us to:
" …remove elements from the front of
lst until the front of the list is not even. The function should then return
For example if
lst started as
[4, 8, 10, 11, 12, 15] , then
delete_starting_evens(lst) should return
[11, 12, 15] ."
At first, I tried using a for loop until I learned that modifying the list while iterating through it caused a lot of issues. I saw others use while loops in their solutions so that’s what I tried using. Running my code returns an error saying that the ‘lst[index] is out of range’, but I do not understand why?