Invalid literal for int() with base 10?

Kevin M. Wilson kevinmwilson1956 at yahoo.com
Thu May 25 17:30:06 EDT 2023


Ok, I'm not finding any info. on the int() for converting a str to an int (that specifies a base parameter)?! The picture is of the code I've written... And the base 10 paradigm involved?? years = int('y') # store for calculationValueError: invalid literal for int() with base 10: 'y'What is meant by "invalid literal"? I'm trying to convert srt to int, and I didn't know I needed to specify the base. Plus I haven't read anything that I need to specify the base for the int().
Attached is the code, showing the code and the execution of said code.
"When you pass through the waters, I will be with you: and when you pass through the rivers, they will not sweep over you. When you walk through the fire, you will not be burned: the flames will not set you ablaze."      
Isaiah 43:2


More information about the Python-list mailing list