Python Tutorial

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
Back ⚡ Practice with PyChallengeNext