"Steven W. Orr" <[EMAIL PROTECTED]> writes: > I have a list ll of intergers. I want to see if each number in ll is > within the range of 0..maxnum > > I can write it but I was wondering if there's a better way to do it?
if all(0 <= x <= maxnum for x in ll): ... This genexp is better than a loop because it bails out immediately if it finds an out-of-range x. -- http://mail.python.org/mailman/listinfo/python-list