Introduction to Number Data Types
In Python programming, numbers are one of the most fundamental data types you'll use every day. Think of numbers as basic ingredients in cooking. Without good basic ingredients, the dish you create won't be perfect. Similarly with programming, without understanding numbers well, the programs you create will be difficult to develop.
Python is very flexible in handling numbers. When you type numbers in the Python shell, Python immediately recognizes and displays them back. Let's see how Python works with numbers.
>>> 44>>> 4.4.0>>> 0.300.3>>> 0.00009999.99e-05>>> 2. + 1j(2+1j)From the example above, you can see Python automatically recognizes various number formats. When you type , Python knows it's an integer. When you type with a dot at the end, Python converts it to a decimal number .