I have a string like this "1 1 3 2 1 1 1 2 1 1 1 1 1 1 1 1,5 0,33 0,66 1 0,33 0,66 1 1 2 1 1 2 1 1 2 0,5 0,66 2 1 2 1 1 1 0 1".
How to add elements to each other in python ?
I've tried :
list = []
for x in str.replace(' ', ''):
list.append(x)
sum = 0
for y in list:
sum = sum + double(x)
but I'm getting errors constantly.