What means " & " in python, what action it does? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

What means " & " in python, what action it does?

2nd Apr 2017, 12:15 PM
GooDeeJaY
GooDeeJaY - avatar
3 Answers
+ 9
& represents a bitwise AND operator. It returns True only if both arguments are 1. 0 & 0 = False 0 & 1 = False 1 & 0 = False 1 & 1 = True
2nd Apr 2017, 6:08 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
& in Python is a set operation used for intersection if two sets.
2nd Apr 2017, 1:36 PM
Nithin
Nithin - avatar
+ 2
& is a bitwise operator https://wiki.python.org/moin/BitwiseOperators
2nd Apr 2017, 1:39 PM
LordHill
LordHill - avatar