Euler solutions in Python