Python: Invalid Token

孤者浪人 提交于 2019-11-26 14:46:37

I think when you start a literal number with a 0, it interprets it as an octal number and you can't have an '8' in an octal number.

Note that the "^" symbol in the error points exactly to the erroneous column. Together with the line number it points exactly on the digit 8. This can help lead you to what Jeremy suggested.

Just remove leading zeros.

First zero makes number octal.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!