Why is this happening?:
>>> int('20', 3)
6
>>> int('8', 3)
Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
int('8', 3)
ValueError: invalid literal for int() with base 3: '8'
Yes, I have seen this post: ValueError: invalid literal for int() with base 10: ''
But '8' does not have any decimals. Nor does it have any whitespace. Why isn't this working? Surely 8 is possible to represent in base 3.