Python | sympy.perfect_power() method
With the help of sympy.perfect_power() method, we can find two integers b and e such that be is equal to the given number n.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course
n – It denotes an integer.
Returns a tuple of integers (b, e) such that be == n.
n = 64 b = 2 and e = 6. 2^6 == 64
n = 64 b = 8 and e = 2. 8^2 == 64