Python code for Parole