What is the reason for having '//' in Python?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了What is the reason for having '//' in Python?相关的知识,希望对你有一定的参考价值。

In Python 3, they made the / operator do a floating-point division, and added the // operator to do integer division (i.e. quotient without remainder); whereas in Python 2, the / operator was simply integer division, unless one of the operands was already a floating point number.

以上是关于What is the reason for having '//' in Python?的主要内容,如果未能解决你的问题,请参考以下文章

What is the purpose for IT Pro in Windows 10 Creators Update

What reason cause the abrasion of jaw crusher spare parts?

算法9:What is the sum of the digits of the number 21000

The AFFiNE live demo is here (with 15 reasons from the team why you should try)

The AFFiNE live demo is here (with 15 reasons from the team why you should try)

The AFFiNE live demo is here (with 15 reasons from the team why you should try)