[Solved] “Statement expected” on else but there’s nothing wrong with the code?


Else block cannot be kept empty. It must at-least contain ‘pass’.

The line ‘print(error)’ must be indented inside the else block.

Also your ‘Cmdbar()’ in the elif must be indented.

0

solved “Statement expected” on else but there’s nothing wrong with the code?