>>> int("1.6") Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: '1.6' >>> float("1.6") 1.6 >>>
>>> int("1.6") Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: '1.6' >>> float("1.6") 1.6 >>>
转载于:https://www.cnblogs.com/sea-stream/p/11188809.html