Simon Willison’s Weblog

What are some useful techniques and tricks using list comprehension?

My answer to What are some useful techniques and tricks using list comprehension? on Quora

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.

This is What are some useful techniques and tricks using list comprehension? by Simon Willison, posted on 31st December 2012.

Tagged ,

Next: Do comments really count for SEO link building?

Previous: How can I detect manual record insert from mysql cansole into my code in django .?