Checks if all characters in string is digit
'76'.isdigit() # Evaluates to True '1.2'.isdigit() # Evalutates to False
Is decimal works the same way as .isdigit()
.isdigit()
Checks if all characters in the text are letters
'abc'.isalpha() # Evaluates to True '76'.isalpha() # Evaluates to False
Last updated 2 years ago