Answers for "syntaxerror: invalid syntax python"

1

syntaxerror: invalid syntax python

# Three solution of "syntaxerror: invalid syntax" in python :

# 1. Type "exit" in the terminal then run the code again.
# 2. Check for the code.

# First example :
a = 5
if a = 4 : # It is written "=" instead of "=="
  a = a + 1
 
# Second example :
b = (5 * (2 + 5 / (3 - 1)) # There are three "(" but only two ")"

# 3. Restart your computer (don't forget to save the code).
Posted by: Guest on September-22-2021

Code answers related to "syntaxerror: invalid syntax python"

Python Answers by Framework

Browse Popular Code Answers by Language