1. Class-to-object relationships
Capitalize (self): Capitalize first letter
Center (self, Width, fillchar=none): Content centered, Width: total length; Fillchar: padding content in white space, default None
Count (self, sub, Start=none, End=none): Number of subsequence
Decode (self, Encoding=none, Errors=none): Decoding
Encode (self, Encoding=none, Errors=none): encoding, for Unicode
EndsWith (self, suffix, start=none, end=none): Whether to end with XXX
Expandtabs (self, tabsize=none): Converts tab to space, default one tab to 8 spaces
Find (self, sub, Start=none, End=none): Find the sub-sequence position, if not found, return –1
Format (*args, **kwargs): string formatting, dynamic arguments, speaking of functional programming
Index (self, sub, Start=none, End=none): Sub-sequence position, if not found, error
Isalnum (self): whether it is a letter or a number
Isalpha (self): whether it is a letter
IsDigit (self): Whether it is a number
Islower (self): lowercase
Join (self, iterable): Connect
Ljust (self, Width, fillchar=none): Content left aligned, right padding
Lower (self): variable lowercase
Lstrip (self, chars=none): Remove left margin
Partition (self, SEP): Split, front, middle, last three parts
Replace (self, old, new, Count=none): replace
Split (self, Sep=none, Maxsplit=none): Split, maxsplit up to several times
Splitlines (self, Keepends=false): Split by line break
StartsWith (self, prefix, Start=none, End=none): whether to start
Strip (self, Chars=none): Remove both ends of the gap
Swapcase (self): uppercase to lowercase, lowercase to uppercase
Translate (self, table, Deletechars=none): conversion, you need to make a corresponding table, the last one represents the deletion of the character set
Zfill (self, width): The method returns a string of the specified length, the original string is right-aligned, and the front padding is 0.