[ad_1]
One approach
def filterList(numList, threshold):
return list(filter(lambda x: x < threshold, numList))
Another approach:
filteredList = [x for x in numList if x < threshold]
0
[ad_2]
solved How do I return a list of numbers below a certain threshold without using complex list functions? [closed]