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