+ 1

How to debug invalid syntax error

8th Sep 2018, 8:23 AM
Tamil Arasi
Tamil Arasi - avatar
3 Respostas
+ 3
I think when invalid syntax error occur you need to go line by line on your code.always indent your code in proper way use parentheses and square brackets in right way because most of time they produce invalid syntax error. when invalid syntax error occurr then ide show black line where it occurs.you can use online ide debugger for it check it. https://www.onlinegdb.com/online_python_debugger
8th Sep 2018, 12:31 PM
Maninder $ingh
Maninder $ingh - avatar
+ 1
Can you a little more specific? Invalid syntax basically states that necessary "grammar" in your program is missing or incorrect, and the interpreter can't understand what your program is reading to it. examples are parenthesis at the end of a function such as len(list) as opposed to len{list) or assigning variables versus comparing variables (as well as a missing colon), such as if num1 = num2 as opposed to if num1 == num2: try sending us your code, along with the error your experiencing, so we can help you further.
8th Sep 2018, 8:31 AM
mrhonk123
mrhonk123 - avatar
+ 1
In most cases the error message also shows you the line where the syntax error happened
8th Sep 2018, 8:45 AM
Matthias
Matthias - avatar