while (assignment):
Andrew Dalke
adalke at mindspring.com
Tue Jul 29 20:29:59 EDT 2003
More information about the Python-list mailing list
Tue Jul 29 20:29:59 EDT 2003
- Previous message (by thread): while (assignment):
- Next message (by thread): while (assignment):
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Michele Simionato > Second answer: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/202234 I just added this alternative >>> a = [1, 2, 9, 0] >>> n = iter(a).next >>> while [x for x in [n()] if x]: ... print "I have", x ... I have 1 I have 2 I have 9 >>> Again, don't this in real code. Evil. But cute. Andrew dalke at dalkescientific.com
- Previous message (by thread): while (assignment):
- Next message (by thread): while (assignment):
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list