The isdecimal() method checks whether a string consists of decimal characters only. This method only exists for unicode objects.
Note: To define a string as Unicode, just prefix it with a 'u' left quote. Below are examples.
Syntax
The following is the syntax of the isdecimal() method:
str.isdecimal()
##Parameters NAReturn valueThis method returns true if all characters in the string are decimal, otherwise it returns false.
Example
#!/usr/bin/python str = u"this2009"; print str.isdecimal(); str = u"23443434"; print str.isdecimal();
False True