I'm making a Calculator and I want to know if there is a function in python that allows me to find the prime factors of any number.
Asked
Active
Viewed 123 times
0
-
[Write your own function?](https://stackoverflow.com/a/22808285/8881141) What is the upper limit of your numbers? – Mr. T Oct 21 '20 at 11:07
-
1https://pypi.org/project/primefac/ – Ash Oct 21 '20 at 11:39
-
No, there is no such function. You can check for yourself [here](https://docs.python.org/3/library/index.html). There are other libraries out there that can do it, for example [sympy](https://docs.sympy.org/latest/modules/ntheory.html#sympy.ntheory.factor_.factorint) – President James K. Polk Oct 21 '20 at 12:33