So I have this list:
a = '[47.2, 46.6, 46.4, 46.0, 45.7, 45.54, 45.29, 45.01, 44.79, 44.54, 44.15, 0.0]'
How can i pull all the floats and integers in order
I tried
import re
a = [float(s) for s in re.findall("\d+\.\d+", a)]
but doesn't pull integers
Expecting =
a = [47.2, 46.6, 46.4, 46, 45.7, 45.54, 45.29, 45.01, 44.79, 44.54, 44.15, 0]