I have a string:
s = "abcd 90 96.8% ab"
I want to extract 90 and 96.8 from the string like this [90, 96.8]
I have tried doing it by regex:
print(re.findall("\d+\.\d+", s))
output: [96.8]
print(re.findall("\d+", s))
output: [90, 96, 8]
Can anyone tell me the solution which extracts int as well as a decimal from string?