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 -- https://mail.python.org/mailman/listinfo/python-list
Invalid literal for int() with base 10?
Kevin M. Wilson via Python-list Thu, 25 May 2023 16:56:16 -0700
- Invalid literal for int() with base 10? Kevin M. Wilson via Python-list
- Re: Invalid literal for int() with ba... Kevin M. Wilson via Python-list
- Re: Invalid literal for int() wit... Chris Angelico
- Re: Invalid literal for int() with ba... MRAB
- Re: Invalid literal for int() with ba... Grant Edwards
- Re: Invalid literal for int() wit... Grant Edwards
- Re: Invalid literal for int() with ba... Keith Thompson
- Re: Invalid literal for int() wit... Keith Thompson
- Re: Invalid literal for int() with ba... Roel Schroeven