Sunday January 20, 2008
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."]
TrackBack URL for this entry:
Listed below are links to weblogs that reference A Comprehension:
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.
I'm lobbying for legalization of polygamy just so I can marry Python.
Posted by: Hamilton Lovecraft at Jan 21, 2008 10:36:46 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 at Jan 21, 2008 3:36:46 PM
Haskell is sexier because it allows infinite-length lists. :)
Posted by: Darryl McAdams at Jan 23, 2008 11:56:06 PM