Python: Generator Cleanup

This code in this post is in Python 3, but aside from “cosmetic” differences,such as next(g) vs g.next() it applies to Python 2 as well. Read more

Similar

When to Use a List Comprehension in Python

Python list comprehensions make it easy to create lists while performing sophisticated filtering, mapping, and conditional logic on their members. In this tutorial, you'll learn when to use a list comprehension in Python and how to create them effectively... (more…)

Read more »

Many Models Workflows in Python: Part I

This summer I worked on my first substantial research project in Python. I’ve used Python for a number of small projects before, but this was the first time that it was important for me to have an efficient workflow for working with many models at once. I... (more…)

Read more »