Subtraction
suggest changea, b = 1, 2
# Using the "-" operator:
b - a # = 1
import operator # contains 2 argument arithmetic functions
operator.sub(b, a) # = 1
Possible combinations (builtin types):
intandint(gives anint)intandfloat(gives afloat)intandcomplex(gives acomplex)floatandfloat(gives afloat)floatandcomplex(gives acomplex)complexandcomplex(gives acomplex)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents