Message357639
Maybe you are looking for floor division?
https://docs.python.org/3.3/reference/expressions.html#binary-arithmetic-operations
> The / (division) and // (floor division) operators yield the quotient of their arguments. The numeric arguments are first converted to a common type. Division of integers yields a float, while floor division of integers results in an integer; the result is that of mathematical division with the ‘floor’ function applied to the result. Division by zero raises the ZeroDivisionError exception.
Python 3.8
>>> 17 / 3
5.666666666666667
>>> 17.0 / 3
5.666666666666667
>>> 17 // 3
5 |
|
Date |
User |
Action |
Args |
2019-11-29 11:19:39 | xtreak | set | recipients:
+ xtreak, dongjs |
2019-11-29 11:19:39 | xtreak | set | messageid: <1575026379.62.0.627580089135.issue38939@roundup.psfhosted.org> |
2019-11-29 11:19:39 | xtreak | link | issue38939 messages |
2019-11-29 11:19:39 | xtreak | create | |
|