5 lines
147 B
Python
5 lines
147 B
Python
import re
|
|
numeric = re.compile('[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?')
|
|
is_numeric = lambda x: numeric.fullmatch(x) != None
|
|
|
|
is_numeric('123.0')
|