Hi all. I see the solution which makes sense to me, but I can’t figure out why my initial approach below does not work. Any help would be much appreciated. Thanks!!
#Write your function here
def delete_starting_evens(lst):
for num in lst:
if num % 2 == 0:
lst.remove(num)
else:
break
return lst
#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]))