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.
As a general rule, tuples use less memory than a list or array.
Tuples allows for slicing and indexing like lists, but do not have methods for deleting or changing any elements.
Code Example
# creating a tuple
mySiblings = ('Susan', 'James', 'Bryan')
# accessing an element within a tuple:
mySiblings[2]
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.
As a general rule, tuples use less memory than a list or array.
Tuples allows for slicing and indexing like lists, but do not have methods for deleting or changing any elements.
Code Example
Impromvemnet