d=[] for line in f: words=line.split() numberD=float(words[0]) d.append(numberD)
говорит следующее: ValueError: could not convert string to float: ‘0,0011’
d=[] for line in f: words=line.split() numberD=float(words[0]) d.append(numberD)
>>> s='0,0011' >>> float(s) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: could not convert string to float: '0,0011' >>> ns = s.replace(',', '.') >>> ns '0.0011' >>> float(ns) 0.0011 >>> float(s.replace(',', '.')) 0.0011