If I write
print( x <<4 or y>>23)
How will be the output 48??
And print(x and y )
Output: 5 # how can be output 5?
thanks for reaching out!
The >> and << are what’s known as bitwise operators in Python. So x<<y will return x shifted to the left with y bits. And x >> y returns x shifted to the right by y bits.
If you’d like the boolean operators, they are single > or < , so (x < 4 and y>23)