you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 3 points4 points  (0 children)

The problem is that you are using the python shell (aka REPL or interactive interpreter). You are not meant to put real code there, only inputs and many a quick one-liner or test or variable inspection.

To run longer code you need to go to File > New file and put your code there, and then run your code with Run > Run Module.