Tuple

usgb/ˈtʌp.əl/
noun

A tuple is a collection of elements that are ordered and can contain different data types.

In programming, a tuple can store multiple values like a string and an integer together.
Visual representation of "tuple" - A tuple is a collection of elements that are ordered and can contain different data types.

Often appears as...

  • tuple of values
  • tuple data type

Usage tips

Neutral

data structure, ordered collection, function parameters

Definition 1 of 1
Visual representation of "tuple"
LampPro Tip 1/3

Contextual Use

Understanding the context of where tuples are utilized, such as programming or mathematics, helps clarify their purpose.

Illustration for Contextual Use
In a database context, you might query a tuple representing a record.
LampPro Tip 2/3

Immutable Nature

Tuples are often immutable, meaning their values cannot be changed after creation. This is important when passing data that should remain constant.

Illustration for Immutable Nature
Using tuples to ensure data integrity in function arguments.
LampPro Tip 3/3

Differences with Lists

Tuples are often compared to lists; however, they have key differences such as mutability and performance impacts.

Illustration for Differences with Lists
Choosing a tuple over a list can improve performance for fixed-size data collections.
Visual representation of the word "Tuple"

Never forget "Tuple"

Humans forget easily. That's why you should download WordUp: Smart reminders, word games, AI practice, and much more!

Download on the App StoreGet it on Google PlayGet it from MicrosoftGet it on AppGallery
Chrome

WordUp Chrome Extension

As you browse the web instantly look up words you don’t know.

Get Chrome Extension