Getting an 'invalid decimal literal' error in my code—what am I missing?

18 Replies, 1858 Views

Ah, the classic *invalid decimal literal* error. It’s always the little things, right?

The problem is the leading zero in `09.5`. Python doesn’t allow that. Just write `9.5` instead.

For quick debugging, I’d recommend [PyCharm](https://www.jetbrains.com/pycharm/) or even [VS Code](https://code.visualstudio.com/) with a Python extension. They highlight these issues in real-time.

Messages In This Thread



Users browsing this thread: 1 Guest(s)