Homebreadcumb forward arrow iconBlogbreadcumb forward arrow iconData Sciencebreadcumb forward arrow iconList vs Tuple: Difference Between List and Tuple

List vs Tuple: Difference Between List and Tuple

Last updated:
2nd Sep, 2023
Read Time
14 Mins
share image icon
In this article
Chevron in toc
View All
List vs Tuple: Difference Between List and Tuple


In this Article, you will learn the difference between List and Tuple.

It is mutableIt is immutable
The implication of iterations is time-consuming in the list.Implications of iterations are much faster in tuples.
Operations like insertion and deletion are better performed.Elements can be accessed better.
Consumes more memory.Consumes less memory.
Many built-in methods are available.Does not have many built-in methods.
Unexpected errors and changes can easily occur in lists.


Unexpected errors and changes rarely occur in tuples.

Read more to know each in detail.

In Python, list and tuple are a class of data structures that can store one or more objects or values. A list is used to store multiple items in one variable and can be created using square brackets. Similarly, tuples also can store multiple items in a single variable and can be declared using parentheses.

You can also check out our free courses offered by upGrad under Data Science.

In the list vs tuple conversation there is one more thing, that is their modifying nature. The tuples cannot be modified whereas the lists can be modified. One of the reasons why the tuples are known to have a good memory is because of this non-modifying nature.  The number of methods available in these two also differ such as tuples have 33 methods whereas the list has 46 available methods. 

There is a difference in python tuple vs list and the syntax for both tuple and the list also differs such as, the items in tuples are surrounded by parentheses( ) and the items in lists are surrounded by square brackets [ ]. The list consumes more storage space than the tuples. Also, the creation and accessing of the lists is a slower process than the tuples. 

The list and tples are not the same and should not be considered same at all. There is a significant difference between these two. Apart from the mutability difference, their variable sizes are also different, the lists have a variable size whereas the tuples hav e affixed size.

Although there are many differences between list and tuple, there are some similarities too, as follows:

  • The two data structures are both sequence data types that store collections of items.
  • Items of any data type can be stored in them.
  • Items can be accessed by their index.

The table below includes the basic difference between list and tuple in Python.

Check out our Python Bootcamp created for working professionals.

Before jumping to Python tuple vs. list differentiation, let’s find out what exactly these two are. 


A list is one of the major Python data structures used to contain a setlist of things called items. Like arrays, list to tuple Python helps keep similar types of data values together, condensing their code together. This helps perform several detailed operations on multiple values at the same time. For example, a folder of songs on your desktop has different other subfolders adjusted following different genres for a hassle-free collection. List to tuple Python is used to improve efficiency and help the system manage all the values together. 


Just like lists, tuples also contain a set of objects in an ordered manner. These objects are kept separated by commas. Tuples are immutable and do not allow the entrance of additional objects once a tuple is created. Tuples are incapable of expanding or making modifications; therefore, they differ from lists. Removing elements is also not possible from tuples which restrict its collection. The immutability often serves as an advantage in delivering faster, efficient results. 

While the major purpose and foundation of tuple vs. list Python are the same, various methods differentiate the two. Here’s what you will find in this Python tuple vs. list blog!

List And Tuples In Python: Syntax

List Syntax

The [ ] symbol initiates a list. Here is a syntax representing how to declare a list in Python. 

num_list = [1,2,3,4,5]
alphabets_list = [‘a’,‘b’,‘c’,‘d’,‘e’]

Finding different types of data within a list is something common. However, to initiate it, do as follows:

mixed_list = [‘a’, 1,‘b’,2,‘c’,3,‘4’]

Furthermore, one can create a nested list (a list within a list) in Python as well. Here’s how: 

nested_list = [1,2,3,[4,5,6],7,8]

Tuple Syntax

The () symbol initiates a tuple. Here is a syntax representing how to declare a tuple in Python

num_tuple = (1,2,3,4,5)
alphabets_tuple = (‘a’,‘b’,‘c’,‘d’,‘e’)

A Tuple consists of data of different types. However, follow this syntax to initiate it:

mixed_tuple = (‘a’, 1,‘b,’ 2,‘c,’ 3, ‘4’).

Also, one can create a nested tuple in Python as well. Here’s how: 

nested_tuple = (1,2,3,(4,5,6),7,8)

Tuples and List in Python: Syntax Differences

Objects are stored in containers called lists and tuples. However, there are differences in both its use cases and syntax. Tuples are enclosed by round brackets () and lists by square brackets []. Here’s how to create a list and tuple in python.

list_numbers  = [1,2,3,4,5]
tuple_numbers  = (1,2,3,4,5)

To check any object’s data type, use the type function.


List vs Tuple

Python’s most widely used build-in data types Python list vs. tuple are hard to differentiate between considering many similarities they both emit, confusing Python beginners in using the most appropriate one. Here’s how you can differentiate between Python tuple vs. list. 

The table below includes the basic difference between list and tuple in Python.

It is mutableIt is immutable
The implication of iterations is time-consuming in the list.Implications of iterations are much faster in tuples.
Operations like insertion and deletion are better performed.Elements can be accessed better.
Consumes more memory.Consumes less memory.
Many built-in methods are available.Does not have many built-in methods.
Unexpected errors and changes can easily occur in lists.


Unexpected errors and changes rarely occur in tuples.

Learn more about free online python course for beginners here!

The following sections provide a detailed version of the list vs tuple for better understanding.

Our learners also read: Excel online course free!

upGrad’s Exclusive Data Science Webinar for you –

Transformation & Opportunities in Analytics & Insights

Difference in syntax

Tuple vs. list Python syntax has a very slight difference between the two but is essential for the right implementation. One major obvious difference between Python list vs. tuple is list syntax uses a square bracket, while the tuple syntax is surrounded using parentheses. As mentioned in the introduction, the syntax for list and tuple are different. For example:

list_num = [10, 20, 30, 40]

tup_num = (10, 20, 30, 40)

Also, check out our business analytics course to widen your horizon.


One of the most important differences between a list and a tuple is that list is mutable, whereas a tuple is immutable. This means that in list vs. tuple Python lists can be changed after it is created to comply with requirements, while tuples cannot be changed or altered after their creation following your required edits, causing tuples to have a fixed size. 

So, some operations can work on lists, but not on tuples. For example, in data science, if a list already exists, particular elements of it can be reassigned. Along with this, the entire list can be reassigned. Elements and slices of elements can be deleted from the list.

On the other hand, particular elements on the tuple cannot be reassigned or deleted, but it is possible to slice it, and even reassign and delete the whole tuple. Because tuples are immutable, they cannot be copied.

An item in the list can be changed, it can be accessed directly. The items in the list can be changed by using the indexing operator [ ]. The individual values can also be changed in the lists.

Check out: Python vs Java 

Explore our Popular Data Science Courses


Although there are many operations similar to both lists and tuples, lists have additional functionalities that are not available with tuples. These are insert and pop operations, and sorting and removing elements in the list.

There are many operators such as

The + operatorreturns a tuple that contains the first and the second tuple object.
The [ ] operatorThis returns the item at the given index.
The * operatorThis concatenates many copies of a tuple.
The [: ] operatorReturns the item in a specific range, the two index operands are separated by the :: symbol.


Some of the Python functions can be applied to both data structures, such as len, max, min, any, sum, all, and sorted.

Description of some the functions are mentioned below-

  1. max(tuple) → Returns item from the tuple with the max value.
  2. min(tuple) → Returns item from the tuple with the min value.
  3. tuple(seq) → Converts a list into tuple.
  4. cmp(tuple1, tuple2) → Compares the elements of both the mentioned tuples.


Python ExpressionDescription
(1,2) + (3,4)Concatenation
2 in (1,2,3)Membership
(‘Morning’,) * 2Repetition

Must read: Data structures and algorithms free course!


In Python, tuples are allocated large blocks of memory with lower overhead, since they are immutable; whereas for lists, small memory blocks are allocated. Between the two, tuples have smaller memory. This helps in making tuples faster than lists when there are a large number of elements.

In simple terms, the size would mean the amount of memory a tuple is storing if it is small or large memory. The size can be calculated using the built-in len() function.

Also, visit upGrad’s Degree Counselling page for all undergraduate and postgraduate programs.

 In list vs. tuple Python has to provide an extra memory block to lists as it is expandable and might require it with potential modifications. 

Type of elements

Elements belonging to different data types, i.e., heterogeneous elements, are usually stored in tuples. While homogeneous elements, elements of the same data types, are usually stored in lists. But this is

not a restriction for the data structures. Similar data type elements can be stored in tuples, and different data type elements can also be stored in lists.

Top Data Science Skills to Learn


Lengths differ in the two data structures. Tuples have a fixed length, while lists have variable lengths. Thus, the size of created lists can be changed, but that is not the case for tuples.


The methods that apply only to lists in Python are, insert(), clear(), sort(), pop(), reverse(), remove(), and append(). While these methods are only applicable to lists, a few more are shared by both lists and tuples. These include count() and index() methods.


When it comes to debugging, in lists vs tuples, tuples are easier to debug for large projects due to its immutability. So, if there is a smaller project or a lesser amount of data, it is better to use lists. This is because lists can be changed, while tuples cannot, making tuples easier to track.

Nested lists and tuples

Tuples can be stored in lists, and likewise, lists can be stored inside tuples. In nested tuples, a tuple can hold more tuples and might extend in more than two dimensions. On the other hand,  in nested lists, a list can hold more lists in countless dimensions as you wish.


It is important to understand that there are different cases where it is better to use one of these data structures, such as; using either one depends on the programmer, i.e., choosing one based on whether they want to change the data later or not.

Tuples can be used as equivalent to a dictionary without keys to store data. When tuples are stored within lists, it is easier to read data. Meanwhile, lists can be used to contain similar resembling elements. Tuples are comparatively more time and memory efficient than lists with restricted usage. However, the lists’ immutability makes it efficient to align with potential changes effectively. 

Read: More types of data structures in Python

List And Tuple In Python: Use Cases

The following scenarios call for data storage that works best for Python’s lists: 

  • Lists can hold a variety of data kinds, and you can retrieve them using the index of the list. 
  • Lists are useful for performing computations on a collection of elements since Python enables you to do so directly on the list. 
  • It is simple to expand or decrease the size of your list as necessary if you are unsure how many elements will be kept in it in advance. 

The following scenarios lend themselves to the use of Python’s tuples for data storage: 

  • When you are certain of the precise data that will be entered into an object’s fields, it is ideal to use a tuple. 
  • You can use a tuple, for instance, to store login information for your website. 
  • tuples can only be used as dictionary keys because they are immutable (unchangeable). 
  • However, you must convert a list into a tuple before using it as a key. 

Tuples Over Lists: When To Use It?

Although Lists and Tuple in Python ensures holding sets of data effortlessly, they both are distinct in many ways. However, there are certain circumstances where using Tuples over Lists would be a better decision. These scenarios are as follows:

  • Immutable Data: Since tuples cannot have their contents modified after they have been produced, they are immutable. Given this, Tuples emerge as a better choice for storing data, such as setup parameters, constants, or other data, that mustn’t undergo modifications and remain consistent when the application is running. 
  • Performance: Due to their immutability, tuples are more compact than lists and may be quicker to create, access, and loop over. If you have a sizable amount of data you must regularly store, access, and use but doesn’t require to be changed, utilizing a tuple may be more efficient than using a list. 
  • Data Integrity: Tuples are a useful tool for maintaining data integrity since they guarantee that the data’s structure and contents remain constant. If a function returns a certain number of values, for example, you may intend to return them as a tuple rather than a list so the caller knows how much data to expect. 

Read our popular Data Science Articles


In this article we have discussed about difference between list and tuple and understood about them. This article helps in understanding the differences between lists and tuples. Even though both types are data structures in Python, it is important to be familiar with these differences when making a choice. The most important differences to keep in mind is that lists are mutable, and tuples are not, lists have variable sizes and tuples have fixed sizes. Lastly, operations in tuples can be executed faster.

If you are reading this article, most likely you have ambitions towards becoming a Python developer. If you’re interested to learn python & want to get your hands dirty on various tools and libraries, check out IIIT-B & upGrad’s Executive PG Programme in Data Science.


Rohit Sharma

Blog Author
Rohit Sharma is the Program Director for the UpGrad-IIIT Bangalore, PG Diploma Data Analytics Program.

Frequently Asked Questions (FAQs)

1When is a Python list preferred for storing data?

Python list is considered to be the best data structure to store the data in the following scenarios: A list can be used to store various values with different data types and can be accessed just by their respective indices. When you need to perform mathematical operations over the elements, a list can be used since it allows you to mathematically operate the elements directly. Since a list can be resized, it can be used to store the data when you are not certain about the number of elements to be stored.

2State the various operations of namedtuple.

The namedtuple in Python performs various operations. The following is a list of some of the most common operations performed by the namedtuple - Access by index, Access by key name, make(), _asadict(), using “**” (double star) operator, _fileds(), _replace(), etc.

3What are the different ways of creating a list?

A Python list can be created in multiple ways that are mentioned here. Using for loops - A for loop is the most elemental way of creating a list. A list can be created using a for loop in three simple ways - Create an empty list, Iterate over all the elements that are to be inserted, Append each element in the list using the append() function. Using map(): The map() function in Python can be used alternatively to create a list. This function accepts two parameters - Function: The function to which the map passes each iterable and Iterable: The element or the iterable to be mapped. Using List comprehensions: This method is the most optimized of all three methods. While in the above methods an empty list has to be created first, list comprehensions allow you to insert all the elements in a list using a single line.

4hat is the difference between list and set?

Lists and Tuples are standard data types that stores the data in Python. The data is stored in a sequential manner. Sets also store data types in Python. The difference between these two would be the multiple occurrences. Lists can have duplicates as it can have multiple occurrences whereas the set cannot have duplicates or multiple occurrences.

5What is a list used for?

Lists are useful when the related values are into consideration. They store multiple items in a single lace. This eventually helps in keeping the data together and perform many functions. Alogwith the other things, lists are also useful to allow duplicates, and are mutable. Once an item in the list is created later it can be changed by either addition or deletion.

6What is the basic difference between tuple and dictionary explain with example?

The difference lies in the number of values both can contain within themselves. The tuple contains a set of predefined numbers of values whereas, the dictionary does not have any such limitation. Tuple has values contained in an ordered manner whereas th dictionary has the unordered collection.

7Why is dictionary faster than the list Python?

The reason for the dictionary being faster than the list is because of lookup. Dictionary has lookup capabilities which is implemented using the hash tables in Python. Whereas, the list is an iteration.So to bear the results in list, a wak through the list would be required until the results come across.

8Which is better list or dictionary in Python?

From the speed perspective, the dictionary would be considered as better. As it is faster because of the has lookup feature. The hash lookup is what makes dictionary faster which list does not have. The list requires a walk through until the results are found.

9What is the difference between list and set?

List are ordered mention of the datasets whereas the sets are the unordered mention of the datasets. The set use the non duplicate items whereas the lists use the duplicate items.

10What is the difference between mutable and immutable?

Mutablity shows the abiotic to change. In the context of python, if the value can change then it is considered as mutable. And if the value cannot change then it would be considered as immutable.

Explore Free Courses

Suggested Blogs

17 Must Read Pandas Interview Questions & Answers [For Freshers & Experienced]
Pandas is a BSD-licensed and open-source Python library offering high-performance, easy-to-use data structures, and data analysis tools. Python with P
Read More

by Rohit Sharma

04 Oct 2023

13 Interesting Data Structure Project Ideas and Topics For Beginners [2023]
In the world of computer science, data structure refers to the format that contains a collection of data values, their relationships, and the function
Read More

by Rohit Sharma

03 Oct 2023

How To Remove Excel Duplicate: Deleting Duplicates in Excel
Ever wondered how to tackle the pesky issue of duplicate data in Microsoft Excel? Well, you’re not alone! Excel has become a powerhouse tool, es
Read More

by Keerthi Shivakumar

26 Sep 2023

Python Free Online Course with Certification [2023]
Summary: In this Article, you will learn about python free online course with certification. Programming with Python: Introduction for Beginners Lea
Read More

by Rohit Sharma

20 Sep 2023

Information Retrieval System Explained: Types, Comparison & Components
An information retrieval (IR) system is a set of algorithms that facilitate the relevance of displayed documents to searched queries. In simple words,
Read More

by Rohit Sharma

19 Sep 2023

40 Scripting Interview Questions & Answers [For Freshers & Experienced]
For those of you who use any of the major operating systems regularly, you will be interacting with one of the two most critical components of an oper
Read More

by Rohit Sharma

17 Sep 2023

Best Capstone Project Ideas & Topics in 2023
Capstone projects have become a cornerstone of modern education, offering students a unique opportunity to bridge the gap between academic learning an
Read More

by Rohit Sharma

15 Sep 2023

4 Types of Data: Nominal, Ordinal, Discrete, Continuous
Summary: In this Article, you will learn about 4 Types of Data Qualitative Data Type Nominal Ordinal Quantitative Data Type Discrete Continuous R
Read More

by Rohit Sharma

14 Sep 2023

Data Science Course Eligibility Criteria: Syllabus, Skills & Subjects
Summary: In this article, you will learn in detail about Course Eligibility Demand Who is Eligible? Curriculum Subjects & Skills The Science Beh
Read More

by Rohit Sharma

14 Sep 2023

Schedule 1:1 free counsellingTalk to Career Expert
footer sticky close icon