MonkeeSage a écrit :
> On Mar 5, 1:03 pm, "Steven W. Orr" <[EMAIL PROTECTED]> wrote:
> 
>>I have a list ll of intergers. I want to see if each number in ll is
>>within the range of 0..maxnum
> 
> 
> How about:
> 
> maxnum = 100
> inlist = range(90, 120)
> for i in [i for i in inlist if i >= 0 and i <= maxnum]:

                               if 0 <= i <= maxnum

>     # do something with i, it's in the valid range
>     print i

But I guess Steven is able to come up with such a solution by itself !-)

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

Reply via email to