0

What is the role of it?

5|5 Can you guys tell me what is the role of this symbol "|"

24th Feb 2021, 11:20 PM
OSAMA AGDID
OSAMA AGDID - avatar
3 Respuestas
+ 3
Binary operator "or" which operates on bits ,just google about it .
24th Feb 2021, 11:30 PM
Abhay
Abhay - avatar
+ 2
if outside quotes, | operator is binary OR operator... if inside quotes, it could be a lot of things, but usually act as a separator...
24th Feb 2021, 11:29 PM
visph
visph - avatar
+ 1
Idk if it's the same in python, but in C/C++ this symbol is just bitwise 'or'. For example 10|6= 1010 0110 = 1110 = 14 Because it compares those 0/1 in columns, and if there is at least one 1, then final value becomes 1 too
24th Feb 2021, 11:29 PM
Michal Doruch