# map()

say it: **“MAP”** **/mæp/**

Runs a function on every item in a collection.

## What does `map()` do?

`map()` runs a function on every item in a collection and gives back the results.

```python
prices = ["4.50", "3.25"]
numbers = list(map(float, prices))
print(numbers)  # [4.5, 3.25]
```

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

Updated: November 17, 2026

## In other subjects

- [map() in Java](https://www.ask-codey.com/glossary/map-java-2)
- [map() in JavaScript](https://www.ask-codey.com/glossary/map-javascript)

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