python
#Beforehand[" ", "\t", "\n", "\v", "\f", "\r"]Delete around
val = "2.71828"
str.isdigit(val.replace(".", "", 1)) # => True
val = "3.1.4.1.5.9"
str.isdigit(val.replace(".", "", 1)) # => False
Delete only one dot and isdigit. Is it okay to do this? Isn't there? I can't find it.
Recommended Posts