# sort()

*noun*

say it: **“sort”** **/sɔːrt/**

A list method that puts the list itself in order, smallest first, or largest first with reverse=True; it changes the list and gives back None.

## What does `sort()` do?

`sort()` puts a list in order, changing the list itself. Add `reverse=True` for biggest first.

```python
scores = [72, 95, 88]
scores.sort(reverse=True)
print(scores)  # [95, 88, 72]
```

## In a sentence

- “**sort()** with reverse=True put the highest score first.”
- “scores.**sort**() changed the list in place, so the old order was gone.”

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

Updated: November 19, 2026

## In other subjects

- [sort() in JavaScript](https://www.ask-codey.com/glossary/sort-javascript)

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