use list comprehension instead of filter call as suggested by 2to3 script