• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
7 views

Problem :

Every time I submitted Python  code, I got

"invalid literal for int() with base 10:"

by (6.9k points)  

1 Answer

0 votes

Solution :

The error is "invalid literal for int() with base 10:". This means that the argument that you passed to int doesn't look like a number. In other words it's either empty, or has a char in it other than a digit.

This can be reproduced in a python shell.

>>> int("x")
ValueError: invalid literal for int() with base 10: 'x'
by (21.9k points)  
edited by
...