Multiple variable control in for loops. Doable in Python?

Derek Martin code at pizzashack.org
Fri Jul 18 17:41:59 EDT 2008


On Fri, Jul 18, 2008 at 05:28:32PM -0400, Derek Martin wrote:
>   def control(i, j):
>       print i,j
>       if not (i < 5 or j < 10):

Rather, if not (i < 5 and j < 10):

>           return
>       else:
>           control(some_increment_function(i), other_increment_function(j))

-- 
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0x81CFE75D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20080718/96aa8ccd/attachment.sig>


More information about the Python-list mailing list