減法

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