python for with double test

2005-12-30 Thread [EMAIL PROTECTED]
hi all the is a way for doing a for with double test: example for i in range(0,10) and f==1: thanx everyone -- http://mail.python.org/mailman/listinfo/python-list

Re: python for with double test

2005-12-30 Thread Peter Hansen
[EMAIL PROTECTED] wrote: hi all the is a way for doing a for with double test: example for i in range(0,10) and f==1: Not sure if you're asking a question, but is this what you are trying to do? : if f == 1: for i in range(0,10):

Re: python for with double test

2005-12-30 Thread Szabolcs Nagy
for i in range(0,10): if f!=1: break ... i=0 while i10 and f==1: ... i+=1 -- http://mail.python.org/mailman/listinfo/python-list

Re: python for with double test

2005-12-30 Thread Alan Franzoni
Il 30 Dec 2005 09:02:30 -0800, [EMAIL PROTECTED] ha scritto: hi all the is a way for doing a for with double test: what's a 'double test' exactly? :-) 'for' does no test, it just iterates over a list. If you want to execute the iteration only if f is 1, do this: if f==1: for i in