MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/duyjs7/i_made_cstyle_printing_in_python_p/f79oexa/?context=3
r/Python • u/[deleted] • Nov 11 '19
130 comments sorted by
View all comments
7
Interesting , what's the mechanism of this working? What do the << and >> operators do for Python?
<<
>>
0 u/[deleted] Nov 11 '19 [deleted] 20 u/Al2Me6 Nov 11 '19 To explain further,x = 0b00000100 x <<= 1 x == 0b00001000 # True
0
[deleted]
20 u/Al2Me6 Nov 11 '19 To explain further,x = 0b00000100 x <<= 1 x == 0b00001000 # True
20
To explain further,
x = 0b00000100 x <<= 1 x == 0b00001000 # True
7
u/[deleted] Nov 11 '19
Interesting , what's the mechanism of this working? What do the
<<and>>operators do for Python?