SlideShare a Scribd company logo
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is Tuple In Python?
Accessing Elements In A Tuple
Changing A Tuple
www.edureka.co/python
Concatenating Two Tuples
Deleting A Tuple
Tuple Methods
List vs Tuple
Tuple Constructor
Other Examples
www.edureka.co/python
www.edureka.co/python
A tuple is an immutable data type in python,
almost similar to a list in python in terms of
indexing and having duplicate members. It
is a collection data type that stores python
objects separated by commas.
www.edureka.co/python
Accessing
Elements In A
Tuple
www.edureka.co/python
• A web-crawler is also known as a web spider,
automatic indexer or simply crawler.
• It is an internet bot that helps in web indexing
• Web crawlers helps in collecting information
from a webpage and the links related to them
• It also helps in validating HTML code and
hyperlinks.
• They crawl one page at a time until all the
pages are indexed.
Indexing It is a data structure technique to
effectively retrieve information from a data
structure. In python, several data types
support indexing
Slicing is a technique in which we use the
slicing operator ‘:’ to get a range of elements
from a tuple or any other data type that
supports indexing for accessing elements.
www.edureka.co/python
Changing A Tuple
www.edureka.co/python
To install scrapy, simply run the following command in
the command prompt or in the terminal, or simply you
can add the package from the project interpreter too.Even though tuples in python are immutable in nature, a
nested object in a tuple can be changed. Or in general, a tuple in
python can be reassigned with a different value.
www.edureka.co/python
Joining two tuples is a very easy task.
You just to assign the addition of the two
tuples to another variable and it will
return the concatenated tuple with the
values of both the tuples
Concatenating
Two Tuples
www.edureka.co/python
www.edureka.co/python
Deleting A
Tuple
www.edureka.co/python
Being an immutable data type, a tuple
in python does not allow any changes
and you cannot even remove an
element from a tuple after the
declaration. But there is a keyword ‘del’
which will delete the tuple altogether.
www.edureka.co/python
Tuple
Methods
www.edureka.co/python
• Returns the count of the elementCount
• Returns the index number of the
element
Index
www.edureka.co/python
List vs Tuple
www.edureka.co/python
•Used for homogenous data types
•Mutable in nature
•Does not have immutable elements
•No guarantee that the data is write-protected
•Generally used for heterogeneous data types
•Immutable in nature, which helps in faster iteration
•Immutable elements can be used as a key for a
dictionary
•Implementing a tuple with data that does not
change guarantees that it is write-protected
www.edureka.co/python
Tuple
Constructor
www.edureka.co/python
• It is possible to create a
tuple using a tuple()
constructor as well. We can
even use the tuple
constructor to change a list
to a tuple.
www.edureka.co/python
Other
Examples
www.edureka.co/python
Iterating Through A tuple
Membership Test On A Tuple
What is Tuple in python? | Python Tuple Tutorial | Edureka
www.edureka.co/python

More Related Content

PPTX
OOP concepts -in-Python programming language
PPTX
Full Python in 20 slides
PDF
What is Dictionary In Python? Python Dictionary Tutorial | Edureka
PDF
What are Data structures in Python? | List, Dictionary, Tuple Explained | Edu...
PDF
Namespaces
PPTX
Chapter 07 inheritance
PDF
What is Python Lambda Function? Python Tutorial | Edureka
PPTX
Packages In Python Tutorial
OOP concepts -in-Python programming language
Full Python in 20 slides
What is Dictionary In Python? Python Dictionary Tutorial | Edureka
What are Data structures in Python? | List, Dictionary, Tuple Explained | Edu...
Namespaces
Chapter 07 inheritance
What is Python Lambda Function? Python Tutorial | Edureka
Packages In Python Tutorial

What's hot (20)

PPTX
Data Structures in Python
PPTX
Unit I - Evaluation of expression
PDF
Python Dictionary
PPSX
python Function
PPTX
Friend function
PPTX
07. Virtual Functions
PPTX
Functions in Python
PPTX
Linked List
PDF
Python Class | Python Programming | Python Tutorial | Edureka
PPTX
Class, object and inheritance in python
PPTX
Python 101: Python for Absolute Beginners (PyTexas 2014)
PDF
Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...
PPTX
Operator Overloading In Python
PPT
Class and object in c++
PPTX
Dynamic Polymorphism in C++
PDF
Let’s Learn Python An introduction to Python
PPT
C++ Memory Management
PDF
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
PDF
Python libraries
PDF
Clean Architecture Applications in Python
Data Structures in Python
Unit I - Evaluation of expression
Python Dictionary
python Function
Friend function
07. Virtual Functions
Functions in Python
Linked List
Python Class | Python Programming | Python Tutorial | Edureka
Class, object and inheritance in python
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...
Operator Overloading In Python
Class and object in c++
Dynamic Polymorphism in C++
Let’s Learn Python An introduction to Python
C++ Memory Management
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python libraries
Clean Architecture Applications in Python
Ad

Similar to What is Tuple in python? | Python Tuple Tutorial | Edureka (20)

PPTX
Tuples.pptx
PDF
Tuple in Python class documnet pritened.
PDF
Python Is Very most Important for Your Life Time.
PDF
Python tuple
PPTX
Python Collections
PPTX
58. Tuples python ppt that will help you understand concept of tuples
PDF
Python Tuple.pdf
PPTX
Tuples in Python 2 Object Oriented Programming.pptx
PDF
updated_tuple_in_python.pdf
PPTX
Chapter 13 Tuples.pptx
PPTX
Chapter 17 Tuples
PPTX
Chapter 13 Tuples.pptx
PPTX
Lecture 09.pptx
PDF
computer science tuple in python project.pdf
PDF
Python tuples and Dictionary
PDF
Tuple Operation and Tuple Assignment in Python.pdf
PPTX
Tuple.py
PPT
Programming in Python Lists and its methods .ppt
PDF
Python-Tuples
PDF
Python Tuples
Tuples.pptx
Tuple in Python class documnet pritened.
Python Is Very most Important for Your Life Time.
Python tuple
Python Collections
58. Tuples python ppt that will help you understand concept of tuples
Python Tuple.pdf
Tuples in Python 2 Object Oriented Programming.pptx
updated_tuple_in_python.pdf
Chapter 13 Tuples.pptx
Chapter 17 Tuples
Chapter 13 Tuples.pptx
Lecture 09.pptx
computer science tuple in python project.pdf
Python tuples and Dictionary
Tuple Operation and Tuple Assignment in Python.pdf
Tuple.py
Programming in Python Lists and its methods .ppt
Python-Tuples
Python Tuples
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
PDF
Top 5 Trending Business Intelligence Tools | Edureka
PDF
Tableau Tutorial for Data Science | Edureka
PDF
Python Programming Tutorial | Edureka
PDF
Top 5 PMP Certifications | Edureka
PDF
Top Maven Interview Questions in 2020 | Edureka
PDF
Linux Mint Tutorial | Edureka
PDF
How to Deploy Java Web App in AWS| Edureka
PDF
Importance of Digital Marketing | Edureka
PDF
RPA in 2020 | Edureka
PDF
Email Notifications in Jenkins | Edureka
PDF
EA Algorithm in Machine Learning | Edureka
PDF
Cognitive AI Tutorial | Edureka
PDF
AWS Cloud Practitioner Tutorial | Edureka
PDF
Blue Prism Top Interview Questions | Edureka
PDF
Big Data on AWS Tutorial | Edureka
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
PDF
Kubernetes Installation on Ubuntu | Edureka
PDF
Introduction to DevOps | Edureka
What to learn during the 21 days Lockdown | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Tableau Tutorial for Data Science | Edureka
Python Programming Tutorial | Edureka
Top 5 PMP Certifications | Edureka
Top Maven Interview Questions in 2020 | Edureka
Linux Mint Tutorial | Edureka
How to Deploy Java Web App in AWS| Edureka
Importance of Digital Marketing | Edureka
RPA in 2020 | Edureka
Email Notifications in Jenkins | Edureka
EA Algorithm in Machine Learning | Edureka
Cognitive AI Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Blue Prism Top Interview Questions | Edureka
Big Data on AWS Tutorial | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Kubernetes Installation on Ubuntu | Edureka
Introduction to DevOps | Edureka

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
SAP855240_ALP - Defining the Global Template PUBLIC.pdf
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Newfamily of error-correcting codes based on genetic algorithms
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
MYSQL Presentation for SQL database connectivity
PDF
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
cuic standard and advanced reporting.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
CroxyProxy Instagram Access id login.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Big Data Technologies - Introduction.pptx
SAP855240_ALP - Defining the Global Template PUBLIC.pdf
madgavkar20181017ppt McKinsey Presentation.pdf
Newfamily of error-correcting codes based on genetic algorithms
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
MYSQL Presentation for SQL database connectivity
HCSP-Presales-Campus Network Planning and Design V1.0 Training Material-Witho...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Chapter 3 Spatial Domain Image Processing.pdf
NewMind AI Monthly Chronicles - July 2025
cuic standard and advanced reporting.pdf
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
CroxyProxy Instagram Access id login.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Advanced Soft Computing BINUS July 2025.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
NewMind AI Weekly Chronicles - August'25 Week I

What is Tuple in python? | Python Tuple Tutorial | Edureka