转换为浮动分割,然后转换回来
这个问题在这里已经有了答案:
尝试这个:
scalavars.ExchangeValue = str(float(scalavars.CurrencyAmount) / float(scalavars.Rate))
链接地址: http://www.djcxy.com/p/48437.html
上一篇: Converting to float for division and then convert back
下一篇: How do I get around this annoying error message? (Python 3.6.1)