Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dictionary (Edit Word): Tuple #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lambeboluwatife
Copy link

Word

Tuple

Updated Meaning/Definition

A tuple is a data structure that is an immutable, or unchangeable, ordered sequence of elements. Because tuples are immutable, their values cannot be modified.

Generally, tuples use less memory than a list or array.

Tuples allow for slicing and indexing like lists but do not have methods for deleting or changing elements.

Key Characteristics of Tuples:

  • Immutable: You cannot modify, add, or remove items after creating the tuple.
  • Ordered: Items in a tuple maintain their defined order.
  • Can Store Different Data Types: Each element in a tuple can be of any data type.
  • Supports Indexing: Access elements using indices starting from 0.

Example (Python)

# creating a tuple 
mySiblings = ('Susan', 'James', 'Bryan')

# accessing an element within a tuple:

mySiblings[2]

@jargons-dev jargons-dev bot added 📖 edit word This PR is a word edit contribution 💻 via jargons-editor This issue/PR was generated through jargons editor labels Dec 8, 2024
Copy link

vercel bot commented Dec 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jargons-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 8, 2024 1:23am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📖 edit word This PR is a word edit contribution 💻 via jargons-editor This issue/PR was generated through jargons editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant