|
发表于 2019-7-21 16:14:55
|
显示全部楼层
本楼为最佳答案
- >>> help(str.isalpha)
- Help on method_descriptor:
- isalpha(self, /)
- Return True if the string is an alphabetic string, False otherwise.
-
- A string is alphabetic if all characters in the string are alphabetic and there
- is at least one character in the string.
- >>> help(str.isdigit)
- Help on method_descriptor:
- isdigit(self, /)
- Return True if the string is a digit string, False otherwise.
-
- A string is a digit string if all characters in the string are digits and there
- is at least one character in the string.
复制代码 |
|