+ 3

What is the usage of >> in python?

x = 5 print(x>>2) Answer: 1 But how???

28th Aug 2020, 4:01 PM
Anonymous
Anonymous - avatar
4 Respostas
28th Aug 2020, 4:09 PM
Arsenic
Arsenic - avatar
+ 4
Thank you all....
28th Aug 2020, 4:12 PM
Anonymous
Anonymous - avatar
+ 2
Jan Markus can you tell me in detail, please?
28th Aug 2020, 4:08 PM
Anonymous
Anonymous - avatar
+ 2
In binary 5 is 101 so with shift right for two position it will be done for 1 .You have to understand binary count first to deal with shift left or right ..
28th Aug 2020, 4:09 PM
HBhZ_C
HBhZ_C - avatar