KiKi想判断输入的字符是不是字母,请帮他编程实现。
import sys
for line in sys.stdin:
if line.strip().isalpha():
print("{} is an alphabet.".format(line.strip()))
else:
print("{} is not an alphabet.".format(line.strip())) while 1:
try:
chr = input()
if 'a'<= chr.lower() <='z':
print('{} is an alphabet.'.format(chr))
else:
print('{} is not an alphabet.'.format(chr))
except:
break