+ 1
Else and elif statements
Every time I use the else: and elif: statements my code doesnât run and it shows me an error stating âinvalid syntaxâ. Why is it so?
2 Answers
+ 3
Seeing the code helps, but you might be leaving it incomplete, like:
if 1 == 2:
print(âuniverse brokeâ)
else:
The code above has syntax error indeed, try writing:
# ...
else:
pass
+ 4
please, post your code here