Simon Willison’s Weblog

Subscribe

Monday, 31st December 2012

What are some useful techniques and tricks using list comprehension?

List comprehensions are neat, but generators are even neater (and if you understand tricks with generators you’ll be able to use list comprehensions more effectively as well). Generator Tricks for Systems Programmers by David Beazley will blow you mind—it’s full of useful real-world examples as well. Read that, then check out his follow-up tutorial A Curious Course on Coroutines and Concurrency.

[... 81 words]

2012 » December

MTWTFSS
     12
3456789
10111213141516
17181920212223
24252627282930
31