Reputation: 11
if new.upper() == "C":
first()
try:
a, b, c = re.split(r"(\s+)", new)
except ValueError:
return
The syntaxs error occures to the colon behind "C". if new.upper() == "C": What can i do to fix this problem?
Upvotes: 0
Views: 37
Reputation: 5384
Your indentation is incorrect. It should look like.
if new.upper() == "C":
first()
try:
a, b, c = re.split(r"(\s+)", new)
except ValueError:
pass
Additionally use pass
instead of return
unless that snippet of code is inside a function. Because return can only be used inside a function.
Edit: Added in the correct indentation points
Upvotes: 1