Stackoverflow Python Filter A List