+ 3
How this operator " | " works in python
3 Réponses
+ 3
Soumya Sahu I'm not going to explain all of them, but it works like this:
5|30
5 is 00101 in binary
30 is 11110
If you compare them bitwise, you get a new number with a 1 where at least one of the bits is 1 and a 0 otherwise:
00101 (5)
11110 (30)
----------
11111 (31)
=> 5|30 = 31
+ 2
Then Please tell me how the output is coming of all these
👇👇👇
https://code.sololearn.com/cIViHAjR0LDj/?ref=app
+ 2
Thank you so much Anna for explaining me.....