center
isdigit
isalpha
Returns True if all characters are digits.
str.isdigit()
Enter values below to update the example in real time.
print
print("123".isdigit()) # True print("12.3".isdigit()) # False print("abc".isdigit()) # False