Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Check for strings as positive/negative - integer/float

# returns `False` for float
>>> '123.3'.isdigit()
False
# returns `False` for negative number
>>> '-123'.isdigit()
False
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Check #strings
ADD COMMENT
Topic
Name
9+3 =