python - Check if string is a real number -
is there quick way find if string real number, short of reading character @ time , doing isdigit() on each character? want able test floating point numbers, example 0.03001. 
if mean float real number should work:
def isfloat(str):     try:          float(str)     except valueerror:          return false     return true note internally still loop string, inevitable.
Comments
Post a Comment