✅ 操作成功!

Python 整除

发布时间:2023-06-13 作者:admin 来源:文学

Python 整除

Python 整除

Version:Python 3.7.3

Python3中除法 ‘/’ 表示浮点运算,例如,3/2=1.5,-3/2=-1.5。除法 ‘//’ 表示整除,例如,3//2=1,-3//2=-2。其中特殊之处为C/C++中 -3/2(整除)等于-1。

Python 文档解释

引用地址:docs.python/3.7/glossary.html#term-abstract-base-class

Python中 ‘//’ 表示floor division(向下取整除法)

👁️ 阅读量:0