python logo

isdigit python


Python hosting: Host, run, and code Python in the cloud!

Return True if string consits only of digits.

Syntax


The format is:


str.isdigit()




Parameters

None

Example


str = u"string digit 1234"
print( str.isdigit() )

str = u"12345"
print( str.isdigit() )

Result:


False
True

BackNext





Leave a Reply: