Read Time:53 Second
Number data types store numeric values. Number objects are created when you assign a value to them.
var1 = 1 var2 = 10
You can delete a single object or multiple objects by using the del statement.
del var del var_a, var_b
Python supports four different numerical types:
- int (signed integers)
- long (long integers, they can also be represented in octal and hexadecimal)
- float (floating point real values)
- complex (complex numbers)
Here are some examples of numbers
- Python allows you to use a lowercase l with long, but it is recommended that you use only an uppercase L to avoid confusion with the number 1. Python displays long integers with an uppercase L.
- A complex number consists of an ordered pair of real floating-point numbers denoted by x + yj, where x and y are the real numbers and j is the imaginary unit.