Skip to main content
10.G: Tuples (Glossary)
- Last updated
Save as PDF
- A type where one value can be checked to see if it is greater than, less than, or equal to another value of the same type. Types which are comparable can be put in a list and sorted.
- data structure
- A collection of related values, often organized in lists, dictionaries, tuples, etc.
- Abbreviation of "decorate-sort-undecorate", a pattern that involves building a list of tuples, sorting, and extracting part of the result.
- The operation of assembling a variable-length argument tuple.
- A type that has a hash function. Immutable types like integers, floats, and strings are hashable; mutable types like lists and dictionaries are not.
- The operation of treating a sequence as a list of arguments.
- shape (of a data structure)
- A summary of the type, size, and composition of a data structure.
- A list (or other sequence) with a single element.
- An immutable sequence of elements.
- tuple assignment
- An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left.