
上QQ阅读APP看书,第一时间看更新
The endswith(), isdigit(), isalpha(), islower(), isupper(), and capitalize() methods
The endswith() method checks whether the given string ends with a specific character or word that we pass as an argument:

The isdigit() method checks whether the given string is of a digit type or not:

The isalpha() method checks whether the given string is of an alphabetic character type or not:

The islower() method checks whether the string is lowercase, while the isupper() method checks if the string is uppercase. The capitalize() method puts a given string into sentence case:
