# Tuples and Unpacking

A tuple groups a few values that belong together, such as a city and its miles, and can't be changed once made, and unpacking gives each value its own name in one line, which is how a function returns two values and how two variables swap.

![Cheat sheet: Tuples and Unpacking](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/6127ce24e07e4e3787ae49229a0e8a34.webp)

- Category: Python
- Level: Apprentice
- Tags: Immutable, python, Return Value (python), Tuple (python), Tuple Unpacking
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/python-tuples-and-unpacking-cheat-sheet
