Basic data type (1), data type (
I. Numbers
Integer int:
# On a 32-bit machine, the integer has 32 digits and the value range is-2 ** 31 ~ 2 ** 31-1, I .e.-2147483648 ~ 2147483647 # In 64-bit systems, the number of digits of an integer is 64-bit and the value range is-2 ** 63 ~ 2 ** 63-1, that is,-9223372036854775808 ~ 9223372036854775807
You can convert a string to a number:
2. String (important: join/find/split/strip/upper/lower/replace)
Common functions of strings:
- Remove blank (strip)
- Split)
- Index
1. capitalize
2. casefold
3. center
4. count
5. startswith
Endswith
6. find
7. format
8. isalnum
9. expandtabs
10. isalpha
11. isdecimal
12. isprintable
13. isspace
14. istitle title
15. join (important)
16. ljust must UST
17. islower lower
18. isupper upper
19. lstrip rstrip strip
20. maketrans
21. partition rpartition
22. split rsplit
23. splitlines
24. startswith endswith
25. swapcase
26. replace