减法

a, b = 1, 2

# Using the "-" operator:
b - a                  # = 1

import operator        # contains 2 argument arithmetic functions
operator.sub(b, a)     # = 1

可能的组合(内置类型):

  • intint(给一个 int
  • intfloat(给一个 float
  • intcomplex(给一个 complex
  • floatfloat(给一个 float
  • floatcomplex(给一个 complex
  • complexcomplex(给一个 complex