power of two

🏠
1 from math import log2
2 class Solution:
3     def isPowerOfTwo(self, n: int) -> bool:
4         if n > 0:
5             l = log2(n)
6             return (l - int(l)) == 0