Write the remove_evens() function, which receives a list of integers as a parameter and returns a new list of integers containing only the odd numbers from the original list. The main program outputs values of the returned list. Hint: If the original list has even numbers, then the new list will be smaller in length than the original list and should have no blank elements. Ex: If the list passed to the remove_evens() function is [1, 2, 3, 4, 5, 6, 7, 8, 9], then the function returns and the program output is:

Respuesta :

The program is an illustration of loops.

Loops are used to perform repetitive operations

The function in Python where comments are used to explain each line is as follows:

#This defines the function

def remove_event(mylist):

   #This creates a new list

   newList = []

   #This iterates through the list

   for i in mylist:

       #This checks if the current list element is not even

       if not i%2 == 0:

           #If yes, the element is appended to the new list

           newList.append(i)

   #This returns the new list

   return(newList)

Read more about similar programs at:

https://brainly.com/question/18269390