Python 判断字符类型:字母、数字、其他
*ch = input('请输入一个字符:')
if ch.isalpha():
print('输入的是英文字母')
elif ch.isdigit():
print('输入的是数字')
else:
print('输入的是其他字符')*
原文地址: https://www.cveoy.top/t/topic/mJeZ 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
*ch = input('请输入一个字符:')
if ch.isalpha():
print('输入的是英文字母')
elif ch.isdigit():
print('输入的是数字')
else:
print('输入的是其他字符')*
原文地址: https://www.cveoy.top/t/topic/mJeZ 著作权归作者所有。请勿转载和采集!