登录
上传中....
如何在 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(',',''))