+ 1
Does anyone know how to never make syntax error in python code
i've been trying to code this snake game but it's awfully hard cause i keep on getting syntax error
4 Antworten
+ 3
Depending on the IDE syntax errors are highlighted.
In general, the more experience you gain, the less syntax errors you will make (or at least find them quicker 😉)
+ 3
I started using pylint. It helps an incredible lot! Just run "pylint <File>", and it shows syntax and style errors. My code got incomparably better.
+ 2
Check for errors frequently - for each few lines changed. There's no way of not making mistakes. But catching them early makes it easy to know where they are and how to fix them.
+ 1
When the interpreter comes to a syntax error, it writes you the number of line where it happened. So look at that line (or around), try to find what's wrong and run again.