# Read-Eval-Print Loop (REPL)

> A prompt where you type one line of code and see the answer at once.

**Field:** Software Development  
**Category:** Editors & Tools  
**Also known as:** REPL, Interactive Shell, Python Shell, Node REPL

## Think of it like

It is like a calculator. You type a sum, press enter, and the answer shows up at once.

## Definition

A REPL is a prompt where you type one line of code and see the answer at once. It reads your line, runs it, prints the result, then waits for the next one. Many languages come with one. Type python3 or node in a terminal and you are in it. It is the quickest way to try out a small idea.

## Example

Emma is not sure how Python rounds 2.5. She opens a REPL, types round(2.5), and sees 2 in a second.

## Example code

```console
$ python3
>>> 2 + 3
5
>>> "hi".upper()
'HI'
```

Each line runs as soon as you press Enter, and the answer prints under it.

## Why it matters

You can test a small idea in seconds, without making a file. It is also how many people first learn a language.

## Common mistake

Building a real program in it. When you close the REPL the code is gone, so save anything you want to keep in a file.

## Three principles

- **Read, run, print.** Then it waits for the next line.
- **One line at a time.** Good for trying, not for building.
- **Nothing is saved.** Copy what works into a real file.

## Related terms

- [Jupyter Notebook](https://learn.benibix.com/term/development/jupyter-notebook)
- [Interpreter](https://learn.benibix.com/term/development/interpreter)
- [Python](https://learn.benibix.com/term/development/python)
- [Node.js](https://learn.benibix.com/term/development/nodejs)
- [Terminal](https://learn.benibix.com/term/infrastructure/terminal)

## Taught in

- [Statements and Expressions](https://learn.benibix.com/learn/development-concepts/statements-and-expressions): Programming Basics, 3/18
- [REPL, Notebooks and DevTools](https://learn.benibix.com/learn/development-tools/repl-notebooks-and-devtools): Coding Tools, 6/13

![A loop of four steps drawn as a circle: read what you type, run it, print the answer, then wait for the next line. Beside it, a terminal shows the Python prompt >>> with 2 + 3 typed in and 5 printed under it. Under that, a notebook shows the same idea in cells, a code cell with its output right below it.](https://learn.benibix.com/diagrams/dev-repl.svg)

---

Source: https://learn.benibix.com/term/development/repl
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
