+ 2
what is going on in this program?
print("what is going on in this program? ") x=4 print(x<<2) x=5 print(x<<2) x=6 print(x<<2) x=4 print(x<<4) x=1 print(x<<4) https://code.sololearn.com/cdn017l94vIx/?ref=app
2 Answers
+ 4
https://www.sololearn.com/learn/4087/
+ 4
<< is a binary operator : left shift.
4 << 2 = 16 because :
4 = 00100
00100 << 2 = 10000 = 16