PyDocs

Nav

Python Runtime Services

str.isdecimal

builtins

method of str
  • str.isdecimal()
Return True if the string is a decimal string, False otherwise.

A string is a decimal string if all characters in the string are
decimal and there is at least one character in the string.
1 Example
>>> '0123456789'.isdecimal()
True
>>> '٠١٢٣٤٥٦٧٨٩'.isdecimal()  # Arabic-Indic digits zero to nine
True
>>> 'alphabetic'.isdecimal()
False
from the Python docs
See Also
No see-alsos for builtins/str.isdecimal
0 Notes
No notes for str.isdecimal