python parse float from string code example
Example 1: extract float from string python
>>> re.findall(r"[-+]?\d*\.\d+|\d+", "Current Level: -13.2 db or 14.2 or 3")
['-13.2', '14.2', '3']
Example 2: convert string to float python
string = "88.88"
print(float(string))
# output
# 88.88