This is to announce that I just used my very first list comprehension in Python. And I liked it!
[I hereby predict that somebody will leave the comment, "You've just taken your first step into a larger world."]
I encountered that while doing a report on python for a programming languages course. I was brand new to python, having only studied Java and C/C++ at the time. I guess "love at first sight" is an accurate depiction of how I felt.
Posted by: Jason | January 20, 2008 at 09:05 PM
I'm lobbying for legalization of polygamy just so I can marry Python.
Posted by: Hamilton Lovecraft | January 21, 2008 at 10:36 AM
I know!! I love these and use them every chance I get. I like to use nested for loops and conditionals inside them. There is also a trick (which I don't really use) to reference the list itself during its creation: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/204297
Posted by: Levi | January 21, 2008 at 03:36 PM
Haskell is sexier because it allows infinite-length lists. :)
Posted by: Darryl McAdams | January 23, 2008 at 11:56 PM