# random Module

*noun*

say it: **“RAN-dum MOJ-ool”** **/ˈrændəm ˈmɒdʒuːl/**

A module in Python's standard library that picks random numbers and random items, used for games, quizzes, samples and shuffling.

## What is the `random` module?

The `random` module picks random numbers and random items, handy for games, quizzes and shuffling.

```python
import random
prizes = ["mug", "t-shirt", "sticker"]
print(random.choice(prizes))  # e.g. sticker
print(random.randint(1, 100))  # e.g. 42
```

## In a sentence

- “The prize wheel uses the **random module** to choose a winner.”
- “random.shuffle() from the **random module** mixed up the quiz questions.”

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/random-module
