Question: 1 4 . Implement removeall Read the specification of the function removeall in the module funcs. Implement this function according to its specification. Again, this
Implement removeall
Read the specification of the function removeall in the module funcs. Implement this function according to its specification. Again, this function modifies the original list and does not return anything. Look at the test cases in tests.py if you are unsure.
Remember that you should never modify the loopsequence in a forloop. So your implementation should either loop over something else positions or use a whileloop. When you have implemented the function, test your answer with the test script. You should now pass all tests.
def removeallalistn:
Removes all instances of n from alist
Examples:
If a removealla changes a to
If a removealla changes a to
If a removealla changes a to
If a removealla changes a to
If a removealla changes a to
Parameter alist: the list to modify
Precondition: alist is a list of numbers float or int
Parameter n: the number to remove
Precondition: n is a number
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
