我如何将“ 0.00”转换为整数而不invalid literal for int() with base 10: '0.00'出错?
这是我当前的代码;
a = int('0.00') # which gives me an error
a = int(float('0.00')) # gives me 0, not the correct value of 0.00
Run Code Online (Sandbox Code Playgroud)
任何建议,将不胜感激!