Hello! I’m trying to solve this problem: https://www.codecademy.com/courses/learn-python-3/lessons/python-functions-loops-cc/exercises/remove-even-nums
I wrote this code:
def delete_starting_evens(lst): for num in lst: if lst % 2 == 0: del lst else: break return lst
This code works, but if all number os the list is even, the lst returned will not be empty. Example:
print(delete_starting_evens([2, 4, 6]))
Why 6 is still there?