# read()

say it: **“REED”** **/ˈrid/**

Reads a whole open file into one string.

## What does `read()` do?

`read()` reads the whole contents of an open file and gives it back as one string.

```python
with open("recipe.txt") as file:
    text = file.read()
print(text)
```

Level: Apprentice · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=2)

Updated: November 17, 2026

Source: https://www.ask-codey.com/glossary/read
