登录
上传中....
如何在 python 中将带点和逗号的字符串转换为浮点数
如何在 python 中将像 123,456.908 这样的字符串转换为浮点 123456.908?
how can i convert a string like 123,456.908 to float 123456.908 in python?
只需用 replace() 去掉 ,:
float("123,456.908".replace(',',''))