And here's another place where list comprehension could make your code cleaner. This one isn't required though, even if it makes things look quite slick.