- Hands-On Penetration Testing with Python
- Furqan Khan
- 91字
- 2021-07-02 14:13:49
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:
