Exercise: Conditionally remove element from list

Complete the function remove_if which takes a list of numbers as input. The function should remove the last number of the list if it's less than 4.
Hint: Use 4 spaces for each level of indentation.
def remove_if(elements): # enter code here...
return elements print(remove_if([1,2,3])) # expected: [1,2] print(remove_if([0,9,19])) # expected: [0,9,19] print(remove_if([3,3,-3])) # expected: [3,3]
Python
Setting up Python environment...
Output