Hey everyone! I’ve been trying to solve this challenge but I can’t seem to find the solution. I tried the ‘Give me the solution’ button, but I still don’t understand whats happening in the function. Could someone please explain to be how this works? Thanks. Heres the code from the solution:
def delete_starting_evens(lst):
while (len(lst) > 0 and lst[0] % 2 == 0):
lst = lst[1:]
return lst