new solution to euler2 in python (full)