Candidate Generation Python