240
笔下虽有千言,胸中实无一策

Python: 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.

posted @ 2017-04-11 08:12  CasperWin  阅读(168)  评论(0编辑  收藏  举报