3.1 built-in type
3.1.1 Numeric type
Numeric Type |
integer Type |
floating-point types |
Boolean type |
plural |
|
int long |
Float |
bool |
Complex |
1) Integer type
After Python 3, the integer type is int and no longer distinguishes between integers and long integers (int and long in Python 2.x), and the length of integers is not restricted (except for hardware physical limitations).
(1) integers can be expressed in a variety of binary notation:
Decimal: 0~9 Combination
Binary: 0b/0b +0~1 combination
Octal: 0o/0o +0~7 combination
Hex: 0x/0x +0~9,a~f Combo
Want to know the type of a data can be viewed using the type () function parameter
Programs that may be used by Python in a CMD writer program to clear the screen
Incomplete Clear Screen
Complete Clear Screen
(2) conversion between different systems
Oct (), Hex () can convert decimal integers to octal, hexadecimal
2) Floating-point number type
3) Boolean type
Boolean type has only two values of true or Fasle
4) plural
Just know that her representation is in the form of A+BJ.
Learning notes for Python/002-2 (2018-5-19)