# import

*noun*

say it: **“IM-port”** **/ˈɪmpɔrt/**

A Python statement that brings a module into your file so you can use what's in it, such as import random.

## What does `import` do?

`import` brings a module into your file so you can use what's in it.

```python
import random
print(random.randint(1, 6))  # a dice roll, like 4
```

## In a sentence

- “**import** random gives the file random.randint.”
- “The first lines of the script **import** json and csv.”

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

Updated: November 19, 2026

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