isdecimal()
Python String isdecimal() Method
Last Updated : 30 Dec 2025
Python isdecimal() method checks whether all the characters in the string are decimal or not. Decimal characters are those have base 10.
This method returns boolean either true or false.
Syntax of Python String isdecimal() Method
It has the following syntax:
Parameters
No parameter is required.
Return
It returns either True or False.
Different Examples for isdecimal() Method in Python
Let's see some examples of isdecimal() method to understand it's functionalities.
Example 1
A simple example of isdecimal() method to check whether the string contains decimal value.
Output:
Example 2
Let's try to check floating value and see the outcome. It will return False if string is not decimal.
Output:
Example 3
Here, we are checking special chars also.
Output: