I calculate an expression like15//-7
, the output is -3
(round downward), and I expect -2
(round zero). So there is a way that rounds zero for python integer division.
Asked
Active
Viewed 22 times
1

douyu
- 2,377
- 2
- 14
- 27