Stack Exchange
Stack Overflow
Questions
Tags
Users
About
Stack Overflow
Public
Questions
Tags
Users
About
Why doesn't -10%-3 equal -10%3 in python?
Asked
Nov 05 '21 at 12:29
Active
Nov 05 '21 at 12:38
Viewed
34 times
0
a=-10%-3 b=-10%3 print(a) print(b)
The result is: a=-1,b=2 Why is there a difference?
python
edited
Nov 05 '21 at 12:33
Tianyu He
asked Nov 05 '21 at 12:29
Tianyu He
3
2
0 Answers
0