Python: quiet output in script for Euler Problem 7