7. Use [] to extract characters
***There are two extraction methods: forward search; reverse search.
Forward search: the first character on the left, offset 0, the second offset 1, and so on, until len(str)-1.
Reverse search: the first character on the far right, offset -1, second offset -2, and so on, until -len(str).
***
8. Variable string and string replacement
String replacement raplace()
variable string io.StringIO()
9. The slice of the string slice()
The so-called slicing of the string, as the name implies, is to cut the string and take the substring
[start offset start: end offset: step]
10.split() function and join() function
split(): The string can be divided into multiple substrings (in the storage list) based on the specified separator. If not specified, the default is a blank character.
The join() function is opposite to the split() function. The join function is used to add a series of substrings.
11. String resides
String residency: Only save a copy of the same immutable string, different values are stored in the string residency pool.
Strings (only underscores—, letters, and numbers) will be enabled. stay