Numbers

3.2. Numbers#

Up to now, we referred to numbers simply as “numbers”. In reality, numbers belong to different sets, each fulfilling a different role. Python provides three sets of numbers:

  • Integer numbers: int

  • Real numbers: float

  • Complex numbers: complex

Fig. 3.3 The three sets of numbers in Python.#

We will however focus only on integers (int) and real numbers (float).