Can you use list comprehensions instead of filter?
http://www.pythonforbeginners.com/lists/list-comprehensions-in-python/