Large Python Code For Prime Factorization