A syntax error is basically a typo in your code, to fix it, you would need to correct this spelling mistake. If you do not know where the error is, I'd recommend looking at the error message, normally it will show a location, such as "Traceback (most recent call last):
File "/home/main.py", line 1, in <module>" in Python, which means there's a syntax error in line 1, or "Main.java:3" for Java, which means there is a syntax error in line 3. It's rather simple to find a syntax error with the GDB Online Debugger.
If you by chance cannot find a clear location for the syntax error, or are using a different IDE, then simply use the comment button beneath and tell me what program you're using to run this code, and what language it's in.
Have a wonderful day,
-TransCode