Question: create a python function called Filter which takes as parameters a list of numbers and a number and returns a new list containing only those

create a python function called Filter which takes as parameters a list of numbers and a number and returns a new list containing only those elements from the original list which are less than the provided number.

for instance

filter ( [ 1 , 4, 2, 3,6,5],4 ) returns [ 1, 2, 3]

and

filter ( [ 1, 2, 10, 1, 2], 2 ) returns [1, 1]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!