[Tutor] What is this [] construction?

Marc Tompkins marc.tompkins at gmail.com
Wed Mar 4 04:18:44 CET 2009


On Tue, Mar 3, 2009 at 7:01 PM, Lie Ryan <lie.1296 at gmail.com> wrote:

> Marc Tompkins wrote:
>  > List comprehensions will make your head hurt the first few dozen times
>
>> you encounter them.  After that, they become easier to use than the longer
>> for-loop structure they replace - as André pointed out, they read almost
>> like English.
>>
> I have to disagree, I immediately fell in love with list comprehension when
> I first meet them.
>

OK, I over-generalized.  They made MY head hurt at first.  Now I love them.

-- 
www.fsrtechnologies.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090303/8986741b/attachment.htm>


More information about the Tutor mailing list