how to get the difference of two numbers in python code example
Example: python difference between two numbers
# use abs(). It doesn't matter which number is larger.
>>> abs(10 - 5)
5
>>> abs(-15 - 5)
15
# use abs(). It doesn't matter which number is larger.
>>> abs(10 - 5)
5
>>> abs(-15 - 5)
15