Can someone explain why I get an invalid syntax error from the Python interpreter when wording this simple if ... else statement? I do not add any tabs myself, just type in the text and press Enter after entering. When I type input after "else:", I get an error. "Else" is highlighted by the interpreter. What's wrong?
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> if 3 > 0: print("3 greater than 0") else: SyntaxError: invalid syntax >>>
source share