(num)
return num != 0 and ((num & (num - 1)) == 0)
States if a number is a power of two (Author: A.Polino)
States if a number is a power of two (Author: A.Polino)
States if a number is a power of two ( Author : A . Polino )
def is_power2(num):
    """
    States if a number is a power of two (Author: A.Polino)
    """
    return num != 0 and ((num & (num - 1)) == 0)
def is_power2 ( num ) : return num != 0 and ( ( num & ( num - 1 ) ) == 0 )