Home  >  Article  >  Backend Development  >  python //What does it mean?

python //What does it mean?

藏色散人
藏色散人Original
2020-05-25 09:54:198896browse

python //What does it mean?

python //What does it mean?

In Python " // " represents integer division.

X // Y

//The effect of the operation is the same for Python2. For point calculation, the result will still be returned in the form of a floating point number, such as -5.0 // 2, the result is -3.0:

Recommended: "python tutorial"

-5 // 2
#2.X 商:-3 余数:1
#3.X 商:-3 余数:1
#C 商:-2 余数:-1
-5.0 // 2
#2.X 商:-3.0 余数:1.0
#3.X 商:-3.0 余数:1.0
#C 商:-2.5 余数:C的取余运算不支持浮点数

The above is the detailed content of python //What does it mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn