What does & in Python mean?
📁 multitude, Advanced Python Topics, example
Good evening to everyone! Please tell me what the operator & in Python means? (this is not related to many).
for example, there is a code that checks whether a number is a power of two:
n = int ( input ()) if n & (n - 1 ): print ( '" this number is not a power of two' ) else : print ( is the number - a power of two' ) what does n & (n-1) mean in the second line?
No answers yet.
Log in to leave an answer