9 lines
143 B
Python
9 lines
143 B
Python
|
|
def is_numeric(s):
|
||
|
|
try:
|
||
|
|
float(s)
|
||
|
|
return True
|
||
|
|
except (ValueError, TypeError):
|
||
|
|
return False
|
||
|
|
|
||
|
|
is_numeric('123.0')
|