python报错 could not convert string to float: '77.23075,'_百度知 ...答:'77.23075,'这个字符串最后一个字符是','所以自然无法转换成float。试试 float('77.23075,'[:-1]) 或者 float('77.23075,'.replace(',','')>>> string = '77.23075,'>>> float(string)Traceback (most recent call last): File "<stdin>", line 1, in <module>ValueError: ...