减法

a, b = 1, 2

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

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

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

  • int 和 int(给一个 int)
  • int 和 float(给一个 float)
  • int 和 complex(给一个 complex)
  • float 和 float(给一个 float)
  • float 和 complex(给一个 complex)
  • complex 和 complex(给一个 complex)