AI engineering glossary · Python core

What is tuple?

Tuple: An ordered, immutable sequence written in parentheses with commas. Once created, its elements cannot be replaced. Tuples suit fixed groups of values such as coordinates, function return values and dictionary keys.

Level: beginnerTopic: Python core

Tuple: an example

point = (12.9, 77.6) stores latitude and longitude; point[0] = 13 raises TypeError.

Related terms

More Python core terms

Where you learn it

Tuple is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.