How to determines whether a character is a letter in Python

1 Answer

0 votes
ch = '9'
print(ch.isalpha())

ch = 'a'
if ch.isalpha():
    print("yes")
else:
    print("no")


'''
run:

False
yes

'''

 



answered Dec 5, 2016 by avibootz

Related questions

...