#python #programming #language #efficiency
- Tuples: Records if the same information on the same position
-
Can be used as immutable list if its size does not change
- Use less memory
- Inside mutable objects tuple does not change, but a new tuple is created Shallow and Deep Copy
-
They are two subclasses of
tuples
used to store records/hold data. They are
- How to type tuples: Typing Tuple
Warning
BUG: Tuple with mutable items can be a source of bugs. AVOID!
References
Ramalho, 2022, Chapter 1