Python code for the project Euler problems