Project Euler in Python