试图用 float(shuiwei) < 0.930 转string为float做比较时,报错:
ValueError: could not convert string to float
既然转string不行,索性把0.930转成string, 即 shuiwei < str(0.930),命令行可以验证:
>>> print (str(0.880) > str(0.930))
False
>>> print (str(0.880) < str(0.930))
True
试图用 float(shuiwei) < 0.930 转string为float做比较时,报错:
既然转string不行,索性把0.930转成string, 即 shuiwei < str(0.930),命令行可以验证:
>>> print (str(0.880) > str(0.930))
False
>>> print (str(0.880) < str(0.930))
True