On Mar 5, 9:19 pm, Paul Rubin <http://[EMAIL PROTECTED]> wrote:
> OK, I didn't read the question that way.  I thought the person just
> wanted a yes or no answer to whether the list contained any elements
> outside the desired range.  If the purpose is to select the elements
> in the range, then use filter/ifilter or a different listcomp/genexp:
>
>    inrange = [x for x in ll if 0<=x<=maxnum]

Well, the OP didn't actually specify what behavior they wanted. I was
just trying to go the with broadest case, with arbitrary values.

Regards,
Jordan

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to