how to check a character is number or letter in python code example
Example 1: python check if character is letter
>>> 'A'.isalpha()
True
>>> '1'.isalpha()
False
Example 2: test if character is number python string
>>> 'A'.isdigit()
False
>>> '1'.isdigit()
True