Compare List and Tuple in Python

Share on facebook
Share on twitter
Share on linkedin
Share on twitter
Share on tumblr

Let’s have a quick glance at how List and Tuple are different from each other by having a look at the below table.

Comparison Between List and Tuple in Python

List Tuples
It is mutable. It is immutable.
Lists are surrounded by square brackets []. Tuples are surrounded by parenthesis ().
It has a variable length. It has a fixed length.
It consumes more memory It consumes less memory as compared to the list
It has several built-in methods It does no have must built-in methods.
Operations such as insertion & deletion are better executed with List. To access the element, Tuple is a better option.

Leave a Comment

Your email address will not be published. Required fields are marked *