Because too many methods, only part of the presentation
1) determining the type - 9
method
Explanation
string.isspace()
If the string contains only blanks, True is returned
string.isalnum()
If there is at least one character string and all the characters are letters or numbers True Returns
string.isalpha()
If there is at least one character string and all the characters are letters True Returns
string.isdecimal()
If the string contains only digit returns True,全角数字
string.isdigit()
If the string contains only digit returns True, 全角数字, ⑴,\u00b2
string.isnumeric()
If the string contains only digit returns True, 全角数字,汉字数字
string.istitle()
If the string is the title of (each word is capitalized) True Returns
string.islower()
All of these (case sensitive) if the character string contains at least one alphanumeric characters, and all lowercase, True is returned
string.isupper()
If the string contains at least one of alphanumeric characters, and all of these (case-sensitive) characters are uppercase, True is returned
2) Find and Replace --7
method
Explanation
string.startswith(str)
Check if the string begins with str, that returns True
string.endswith(str)
Check if the string str is ending, is it returns True
string.find(str, start=0, end=len(string))
Str string is included in the detection, if the start and end the specified range, it is checked whether contained within the specified range, if the index value of the return, otherwise -1
string.rfind(str, start=0, end=len(string))
Similar to the find (), but from the beginning to find the right
string.index(str, start=0, end=len(string))
Similarly with the find () method, but not in the string will get an error if str
string.rindex(str, start=0, end=len(string))
Similar to the index (), but starting from the right