How to check if a string "is" an int?

Paul Rubin http
Wed Dec 21 07:39:11 EST 2005


Kent Johnson <kent at kentsjohnson.com> writes:
> Maybe so, but '15'.isdigit() == True:
> 
> isdigit(...)
>      S.isdigit() -> bool
> 
>      Return True if all characters in S are digits
>      and there is at least one character in S, False otherwise.

Auggggh!!



More information about the Python-list mailing list