Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:05:41) [MSC v.1929 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> # python 注意中英文的切换 不然报错 尤其标点符号
>>> # python 中的单行注释
>>> """ python 中的多行注释 """
>>> # 地板除向下取整 例如: -3/2 = -1.5 -3//2 找比-1.5小的整数-2 (负数绝对值大的反而小 感谢初中数学老师)
>>> -3//2
-2
>>> # 地板除向下取整 例如: 3/2 = 1.5 3//2 找比1.5小的整数 1
>>> 3//2
1
>>>
python x//y (地板除)
最新推荐文章于 2023-01-12 00:49:29 发布