139k views
1 vote
What is the primary difference between a list and a tuple?

User Kstepien
by
6.7k points

2 Answers

1 vote
List is mutable and tuples is immutable. The main difference between mutable and immutable is memory usage when you are trying to append an item. When you create a variable, some fixed memory is assigned to the variable. If it is a list, more memory is assigned than actually used
User Firemaples
by
6.7k points
1 vote
The main difference is memory usage when you are trying to apprehend an item.
User Praveen Mitta
by
6.6k points