Why do I get 'None'?

why am I getting ‘None’ instead of empty list?

def delete_starting_evens(lst):
  while len(lst) > 0:
    if lst[0] % 2 == 0:
      lst.pop(0)
    else: 
      return lst

Did you add a function call? Functions only execute when called

you need to put print before the function call in order to print the returned result

The None might be cause by codecademy validating the exercise

When the list is reduced to zero length, it fails the while condition, and hence does pass through the if statement. There is no return for that case.

Another way around that is to have one return that is not in the loop.

while len(lst) > 0:
    if lst[0] % 2 == 0:
        lst.pop(0)
    else:
        break
return lst