I have a list of numbers; I want a quick and efficient way to
find the subset of these numbers which lie between two limits.
However these numbers are determined within the program itself.
I wanted to do something like
def checklims(a,b,c) :
if a >= b and a < c :
return 1
else :
return 0
...
newlist = filter(checklims,oldlist)
The problem is (as far as I can tell) that filter expects to get
a one-parameter function, and supplies each element of that list
as a parameter, one by one. So how do I tell "checklims" which
limits to use??
I can't wait to see the Tim Peters solution on this one (where IS that
guy anyway??)
JT