Judging letter case and number string in python

String.isalnum() All characters are numbers or letters, return True if true, otherwise return False.

String.isalpha() All characters are letters, True returns True, otherwise returns False.

String.isdigit() All characters are digits, True returns True, otherwise returns False.

String.islower() All characters are lowercase, True returns True, otherwise returns False.

String .isupper() All characters are uppercase, True returns True, otherwise returns False.

String.istitle() All words are capitalized, return True if true, otherwise return False.

String.isspace() All characters are whitespace characters, True returns True, otherwise returns False.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325493454&siteId=291194637