python check if any char in string is a digit 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