You are here : python_2stringstringisnumeric

string.isnumeric() - string

             

The method isnumeric() checks whether the string consists of only numeric characters. This method is present only on unicode objects.


  • NA


Syntax

str.isnumeric()


Example

#!/usr/bin/python


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

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


Output / Return Value

When we run above program, it produces following result −


False True


Limitations


Alternatives / See Also


Reference