What does << represent in python?

后端 未结 4 1687
醉酒成梦
醉酒成梦 2021-01-18 13:06

Python says

1 << 16 = 65536

What operation does << performs in Python?

4条回答
  •  执笔经年
    2021-01-18 14:04

    Another way to think about it is 1 times 2^16.

    So whenever you see x << y interpret it as:

    x * 2^y

提交回复
热议问题