Python string | isdecimal()
isdecimal()-It is a function in Python that returns true if all characters in a string are decimal. If all characters are not decimal then it returns false.
Here string_name is the string whose characters are to be checked
Parameters:This method does not takes any parameters .
True – all characters are decimal
False – one or more then one character is not decimal.
Below is the Python3 implementation of isdecimal() method:
True False False
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course