In programming languages data types using to represent and understand the value of data.Beside of that , we can decide what operations can be performed on data.Each programming languages has same approaches generally , but it is not standartized and every languages has their data type classification.
In Python , we’ve got
Any numeric value classified as Number.These numbers has types according to their represented data.These are integers , floats and complex numbers.In Python 3 , the limit is only computer memory for decide to how long data will be represent.However float values are represented as 64-bit double-precisions.
Positive or negative whole numbers are integers.Python using decimal system for all numbers.However if we need to other number systems,we can use prefix with numbers.
|0b (zero + lowercase letter ‘b’)||Binary||2|
|0o (zero + lowercase letter ‘o’)||Octal||8|
|0x (zero + lowercase letter ‘x’)||Hexadecimal||16|
Some examples with integers
type() method returns class type of the argument(object) passed as parameter.
Float number are fractional.
E-notation is known as exponential notation or scientific notation.1e6 is equivalent to 1×10⁶.