check if char is number python code example
Example 1: isdigit
Non-zero integer ( x > 0 ) Argument is a numeric character.
Zero (0) Argument is not a numeric character.
Example 2: test if character is number python string
>>> 'A'.isdigit()
False
>>> '1'.isdigit()
True