
Asked in Indian Political Action Committee and 11 others
What is the difference between lists and tuples in Python?

Tuple is immutable and ordered while list is mutable and ordered.
Tuple uses () while list uses []
Tuple is faster than list for accessing elements
Tuple can be used as keys in dictionaries while list ca...read more
The primary difference between tuples and lists is that tuples are immutable as opposed to lists which are mutable. Therefore, it is possible to change a list but not a tuple.
The primary difference between tuples and lists is that tuples are immutable as opposed to lists which are mutable. Therefore, it is possible to change a list but not a tuple.
The contents of a tuple c...read more
list is mutable and tuple is immutable.
list is slower when compared to tuple.
Both list and tuple elements may be tuple,string,dict,int.

Interview Questions from Popular Companies










Reviews
Interviews
Salaries
Users

