What is the difference between a list and a tuple?medium
Answer
Lists are mutable, while tuples are immutable.
Explanation
Lists can be changed after creation, while tuples are fixed. Tuples are useful for stable records and can be hashable when their values are hashable.
Follow-upWhen would you choose a tuple over a list?