Python Tuples

#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
Warning

BUG: Tuple with mutable items can be a source of bugs. AVOID!

Warning

sort return a new object for tuple. Take a look on Sort and Sorted.

References

Ramalho, 2022, Chapter 1

Links to this page
#python #programming #language #efficiency