I'm scraping a website and the needed output is a list of floats. when scraping I'm getting back lists of the the floats in str. after converting them to floats I want to combine them to one list so i can iterate over it and write it to csv.
for statname in data['athletes']:
l = list(statname['categories'][1]['totals'][10:12])
ast = (l[0])
nast = []
nast.append(ast)
a = list(nast)
sas = list(map(float, a))
print(sas)
result:
[8.8] [6.3] [6.2] [7.6] [3.0][3.8]
needed:
[8.8, 6.3, 6.2, 7.6...]