2.1 Numeric Types

As the name suggests are numeric values that are used in Python. For example in C/C++/Java there are int, float or double types. Similarly in Python, we have three numeric data types, they are explained below.

Three numeric types in Python.

  1. >Integer (int): Numbers that do not have decimal values. In Python, int is also a long type and it can be of any size.
  2. >Float (float): Numbers that do have decimal values. In Python, float also acts as a double type as it is a double precision floating point number.
  3. >Complex (complex): Numbers that have two parts, real and imaginary. First part is a normal number, the second part is an imaginary number which should be followed by "j".