0
Good morning, does anyone know what that vertical bar in python means?
4|3 = 7
12|4 = 12
0
Good morning, does anyone know what that vertical bar in python means?
4|3 = 7
12|4 = 12
1
is an operator or binary, it makes a or with the binaries, compare bit to bit making a or and gives the result.
4 in torque = 0100
3 in torque = 0011
0100 or 0011 = 0111
7 in torque = 0111
12 in torque = 1100
Browser other questions tagged python operators
You are not signed in. Login or sign up in order to post.
Jurandir, this answer will help you https://answall.com/a/238225/110782
– Luiz Augusto