![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archive"For" loop and list comprehension similarity
From: <s.lipnevich@gmail.com>
Date: Sun Mar 26 2006 - 20:09:50 CEST
Hi All,
I apologize if this was brought up before, I couldn't find any "prior
for i in c if <test>:
...because it's similar to the list comprehension construct:
[i*2 for i in c if <test>]
Is this the intended difference in constructs? The available equivalent
for i in c:
Just curious. Thanks!
Sergey.
|