From the course: Python for Students (2019)

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Saving and running Python files

Saving and running Python files - Python Tutorial

From the course: Python for Students (2019)

Saving and running Python files

- [Instructor] When we open up IDLE, the first screen that appears is the Shell, which allows us to type Python commands and have them executed immediately. The Python Shell is great for debugging or testing things out, but generally our programs are going to be more than one line long. We could type them out one at a time in the Shell, but if we made a mistake on any one of them we would potentially have to start over and retype all the lines that came before it. This could get pretty tedious pretty fast. Instead, let's create a file using our built in editor in IDLE. To do that, I'm going to go ahead and click File, New File, and this will bring up the editor. Let's resize our windows so that we can see both the Shell and the editor in the same screen. Great, let's now type a Python command into the editor. Go ahead and type print and hello world. Notice that you get some really nice built in features with this…

Contents