Programming Languages

What is the difference between a list and a tuple in Python?

Easy
5
Added
A list is mutable, meaning you can change its contents after it is created. A tuple is immutable, meaning once it is created, its contents cannot be changed. Lists are defined using square brackets [], while tuples are defined using parentheses ().