Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I'm a little bit confuse in using int(x, [base]). Can someone explain why it keeps throwing this error? Sorry, im just starting to learn the basics.
Traceback (most recent call last):
File "<pyshell#63>", line 1, in <module>
int('23123',1)
ValueError: int() base must be >= 2 and <= 36
Traceback (most recent call last):
File "<pyshell#75>", line 1, in <module>
int('123',3)
ValueError: invalid literal for int() with base 3: '123'
–
–
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.