Just a suggestion, but I think the equivalent list comprehension would more readable than the combination of filter and lambda used here