We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s1 = '12345' print('12345是数字:',s1.isdigit()) ##12345是数字: True print(int(s1)) ##12345 s2 = '12345a' print('12345a是数字:',s2.isdigit()) ##12345a是数字: False print('12345a是字母数字混合形式:',s2.isalnum()) ##12345a是字母数字混合形式: True s3 = '12_345a' print('12_345a是字母数字混合形式:',s3.isalnum()) ##12_345a是字母数字混合形式: False print(" ".isspace()) ## True print("12.45".isdecimal()) # 检测字符串中是否为整数 ## False print("abc3d".isalpha()) # 检测字符串中是否为纯字母 ## False
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: