Python判断字符串组成的方法
mystr = 'hello world and gzy and java and python'
print(mystr.isalpha()) # 是否是纯字母构成
print(mystr.isalnum()) # 是否是字母和数字的组合
print(mystr.isdigit()) # 是否是纯数字构成
print(mystr.isspace()) # 是否是空白构成
mystr = 'hello world and gzy and java and python'
print(mystr.isalpha()) # 是否是纯字母构成
print(mystr.isalnum()) # 是否是字母和数字的组合
print(mystr.isdigit()) # 是否是纯数字构成
print(mystr.isspace()) # 是否是空白构成