You are here : python_2stringstringisdecimal

string.isdecimal() - string

             

The method isdecimal() checks whether the string consists of only decimal characters. This method are present only on unicode objects.


  • NA


Syntax

str.isdecimal()


Example

#!/usr/bin/python


str = u"this2009";  
print str.isdecimal();

str = u"23443434";
print str.isdecimal();


Output / Return Value

When we run above program, it produces following result −


False True


Limitations


Alternatives / See Also


Reference