Operator:
1. Arithmetic operations:
2. comparison operation:
3. Assignment Operation:
4. Logic operation:
5. Member Operations:
Basic data type:
1. Number:
int (integral type)
On a 32-bit machine, the number of integers is 32 bits, the range is -2**31 ~ 2**31-1, i.e.-2147483648 ~ 2147483648
On a 64-bit machine, the number of integers is 64 bits and the range is -2**63 ~ 2**63-1, which is -9223372036854775808~9223372036854775807
2. Boolean value:
True or False 1 or 0
3. String:
"Hello World"
string concatenation: The string in Python is embodied in the C language as a character array, each time you create a string, you need to open a contiguous space in memory, and you need to modify the string, you need to open up again, the evil + every occurrence will re-open in memory space
String formatting:
" Alex " Print ("My name is%s")% nameprint ("my nameis" ), name
(String is%s, integer is%d, floating-point number is%f)
String Common functions:
Remove whitespace
Segmentation
Length
Index
Slice
Python-Basic data types