Python cannot convert a floating-point string to an integer in one step.
When you get the error message
Exception: invalid literal for int() with base 10: ‘7.0’
Convert the string to float first
a = int(float(str))
Knowledge Base for IT Professionals, Teachers and Astronauts
Python cannot convert a floating-point string to an integer in one step.
When you get the error message
Exception: invalid literal for int() with base 10: ‘7.0’
Convert the string to float first
a = int(float(str))