Power of Two Description link Solution Power of 2 means there is only 1 in bit-form Code O(n) class Solution: def isPowerOfTwo(self, n): """ :type n: int :rtype: bool """ return n > 0 and not (n & n-1)