isdecimal() method in Python
The isdecimal() method returns True if all characters in the string are decimal (0-9).
Syntax
string.isdecimal()
No Parameters
The following example shows, the string is decimal or not.
Example
a = "1234" b = a.isdecimal() print(b)
Output
True