From the course: Visual Studio Code for Python Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using the Python REPL

Using the Python REPL

From the course: Visual Studio Code for Python Developers

Start my 1-month free trial

Using the Python REPL

- [Instructor] Earlier in the course, we saw a simple example of how to execute a line of Python code in the interpreter using Shift + Enter Let's take a closer look at that feature now which used the Python extensions R E P L or REPL feature. So REPL stands for Read Evaluate Print Loop, it's an interactive form of working with Python that you can perform directly within .vscode So let's open up a sample file here and it's called Test REPL, and to start the interpreter, first I'll select these few lines here so I import the math module and then calculate, well I don't really calculate anything, I'm just going to print out the value of pi. So I'm going to type Shift + Enter and you can see that when I do that, that starts the interpreter in the terminal and you can see that each of the lines of codes is being run in the interpreter and then there's the result right there. Now sometimes I found that .vscode will send the initial lines of code before the interpreter is actually ready. If…

Contents