+ 1
How to debug invalid syntax error
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
+ 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.
+ 1
In most cases the error message also shows you the line where the syntax error happened