+ 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 Respostas
+ 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