String isnumeric
Return True if string is numeric.
Syntax
The format is:str.isnumeric()
Parameters
None
Example
str = u"someone speak python here? sssss"
print( str.isnumeric() )
str = u"12345"
print( str.isnumeric() )
Result:
False True
Practice
Stop reading. Start writing Python.
PyChallenge gives you interactive exercises in your browser — no install needed.
Practice Python with interactive exercises