SlideShare a Scribd company logo
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
• What are Data Structures?
• Why are Data Structures needed?
• Types of Data Structures in Python
• Built-In Data Structures
✓ Lists
✓ Dictionary
✓ Tuple
✓ Sets
• User-Defined Data Structure
✓ Array
✓ Stack
✓ Queue
✓ Linked List
✓ Tree
✓ Graph
www.edureka.co
www.edureka.co/python
www.edureka.co/python
What are Data Structures?
www.edureka.co/python
Open Source
OOPS
Large Standard
Library
Easy to Learn
Data Structures are used to organize, store and
manage data for efficient access and modification
www.edureka.co/python
Why are Data Structures needed?
www.edureka.co/python
• Imagine your workspace set according to your
needs
• Helps you work faster because it is imprinted in
your mind
• Change in workspace leads to increase in time
to access your requirement
• Same goes for data, as it needs to be stored
efficiently which results in better access and
modification
Types of Data Structures in Python
www.edureka.co/python
Types of Data Structures in Python
www.edureka.co/python
Data Structures in
Python
User-Defined Data
Structures
Built-in Data
Structures
List
Dictionary Set
Tuple Stack
Queue LinkedList
Tree
HashMap
Graph
www.edureka.co/python
Built-In Data Structures
www.edureka.co/python
Large Standard
Library
Tuples
Dictionary
Sets
Lists
Built-In Data Structures
www.edureka.co/python
Open Source
Large Standard
Library
Lists
Tuples
Dictionary
Sets
• Lists can have heterogenous
data types in them
• Lists are mutable
Built-In Data Structures
www.edureka.co/python
Open Source
Large Standard
Library
Lists
Tuples
Dictionary
Sets
• Same as lists but not mutable
• Faster than lists
Built-In Data Structures
www.edureka.co/python
Open Source
Large Standard
Library
Lists
Tuples
Dictionary
Sets
• Hold key, value pairs
• Dictionaries are mutable
Built-In Data Structures
www.edureka.co/python
Open Source
Large Standard
Library
Lists
Tuples
Dictionary
Sets
• Un-ordered collection of
unique elements
• Sets are mutable
www.edureka.co/python
User-Defined Data Structures
www.edureka.co/python
Stack
Trees
Queues
HashMaps
Linked List
Graphs
User-Defined Data Structures
www.edureka.co/python
Arrays
12 1 56 13 134
0 1 2 3 4
1.2 1.0 5.6 1.3 13.4
0 1 2 3 4
• Arrays are used to store data of
just one type
• They have index which is used to
access the data accordingly
User-Defined Data Structures
www.edureka.co/python
Stack
1 2 3 • Stacks are made from arrays
• Stacks follow the LIFO principle
• They have a pointer called TOP which is to
track the top of the element
TOP
User-Defined Data Structures
www.edureka.co/python
Push
1
2 3
• This is the push operation where data is added
into the stack
TOP
User-Defined Data Structures
www.edureka.co/python
1
2
3
TOP
• This is the push operation where data is added
into the stack
Push
User-Defined Data Structures
www.edureka.co/python
1
2
3TOP
• This is the push operation where data is added
into the stack
Push
User-Defined Data Structures
www.edureka.co/python
1
2
3
• This is the pop operation where the data is
deleted from the stack
TOP
Pop
Queues
User-Defined Data Structures
www.edureka.co/python
• Queues are made from arrays
• Queues follow the FIFO principle
• Operations can be performed from the front or
back of the queue
1 2 3
HEADTAIL
En-Queue
User-Defined Data Structures
www.edureka.co/python
• En-Queue operation is adding elements into the
queue
1
2 3
HEADTAIL
User-Defined Data Structures
www.edureka.co/python
1
2
3
• En-Queue operation is adding elements into the
queue
HEAD
TAIL
En-Queue
User-Defined Data Structures
www.edureka.co/python
1
2
3
• En-Queue operation is adding elements into the
queue
HEAD
TAIL
En-Queue
User-Defined Data Structures
www.edureka.co/python
• De-Queue operation is to delete elements from
the queue
1
2
3
HEAD
TAIL
De-Queue
Trees
User-Defined Data Structures
www.edureka.co/python
• Trees are helpful to define hierarchy
• The tree starts with the root node and go
further down
• The last nodes are called as the child nodes
Root
1 3
1 2 53
Linked List
User-Defined Data Structures
www.edureka.co/python
• Linked Lists are made up of two fields, the data
and the next field
• The data field holds data and the next field
points to the next node
• The first node is called as the head
Head
Data NEXTData NEXT Data NEXT
End
Graphs
User-Defined Data Structures
www.edureka.co/python
• Graphs closely represent real world
geographical locations
• They have vertices and edges
• Can be used to find shortest path and help in
finding least cost
www.edureka.co/python

More Related Content

PPT
5.1 mining data streams
PPTX
Cpu scheduling
PPTX
Introduction to IoT Security
 
PDF
Reproduction in animal for class 8th by Sarita Chourasia
PPTX
Microsoft Excel Tutorial
PDF
PPTX
Introduction to Cryptography
PPTX
Introduction to Machine Learning
5.1 mining data streams
Cpu scheduling
Introduction to IoT Security
 
Reproduction in animal for class 8th by Sarita Chourasia
Microsoft Excel Tutorial
Introduction to Cryptography
Introduction to Machine Learning

What's hot (20)

PDF
What is Python? | Edureka
PDF
What is Dictionary In Python? Python Dictionary Tutorial | Edureka
PPT
Python Dictionaries and Sets
PDF
Python Programming Tutorial | Edureka
PDF
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
PPTX
Introduction to python
PDF
Introduction To Python | Edureka
PDF
Python-03| Data types
PPTX
Graph representation
PPSX
Modules and packages in python
PDF
Python Class | Python Programming | Python Tutorial | Edureka
PDF
Binary tree
PDF
8 python data structure-1
PDF
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
PDF
Python Basics | Python Tutorial | Edureka
PDF
PDF
Introduction To Python
PPTX
File Handling Python
What is Python? | Edureka
What is Dictionary In Python? Python Dictionary Tutorial | Edureka
Python Dictionaries and Sets
Python Programming Tutorial | Edureka
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
Introduction to python
Introduction To Python | Edureka
Python-03| Data types
Graph representation
Modules and packages in python
Python Class | Python Programming | Python Tutorial | Edureka
Binary tree
8 python data structure-1
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Python Basics | Python Tutorial | Edureka
Introduction To Python
File Handling Python
Ad

Similar to What are Data structures in Python? | List, Dictionary, Tuple Explained | Edureka (20)

PPTX
Stack and Queue......................pptx
PPT
Data Structure - Complete Basic Overview.ppt
PPTX
DATA STRUCTURES Unit III.pptxctxt8xtxt8xtct8xtdtict
PDF
Lecture 3 - Exploratory Data Analytics (EDA), a lecture in subject module Sta...
PPTX
Lecture 2 Data Structure Introduction
PPTX
stack.pptx
PPTX
JOSA TechTalk: Metadata Management
in Big Data
PDF
Handling of Large Data by Salesforce
PPTX
Jethro for tableau webinar (11 15)
PPTX
Eureka, I found it! - Special Libraries Association 2021 Presentation
PPTX
data warehousing need and characteristics. types of data w data warehouse arc...
PDF
Harness the power of Data in a Big Data Lake
PPT
Unit 3 part i Data mining
PPTX
lecture1-2202211144eeeee24444444413.pptx
PPTX
lecture1-220221114413Algorithims and data structures.pptx
PPTX
Dev Analytics Aggregate DB Design Analysis
PDF
How to obtain the Cloudera Data Engineer Certification
PPTX
The Data Engineering Guide 101 - GDGoC NUML X Bytewise
PPT
Data Structures
PPT
Data ware housing - Introduction to data ware housing process.
Stack and Queue......................pptx
Data Structure - Complete Basic Overview.ppt
DATA STRUCTURES Unit III.pptxctxt8xtxt8xtct8xtdtict
Lecture 3 - Exploratory Data Analytics (EDA), a lecture in subject module Sta...
Lecture 2 Data Structure Introduction
stack.pptx
JOSA TechTalk: Metadata Management
in Big Data
Handling of Large Data by Salesforce
Jethro for tableau webinar (11 15)
Eureka, I found it! - Special Libraries Association 2021 Presentation
data warehousing need and characteristics. types of data w data warehouse arc...
Harness the power of Data in a Big Data Lake
Unit 3 part i Data mining
lecture1-2202211144eeeee24444444413.pptx
lecture1-220221114413Algorithims and data structures.pptx
Dev Analytics Aggregate DB Design Analysis
How to obtain the Cloudera Data Engineer Certification
The Data Engineering Guide 101 - GDGoC NUML X Bytewise
Data Structures
Data ware housing - Introduction to data ware housing process.
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
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
PDF
ITIL® Tutorial for Beginners | ITIL® Foundation Training | 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
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
ITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka

Recently uploaded (20)

PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
Teaching material agriculture food technology
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Big Data Technologies - Introduction.pptx
PDF
Advanced IT Governance
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
Teaching material agriculture food technology
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
Sensors and Actuators in IoT Systems using pdf
Empathic Computing: Creating Shared Understanding
Big Data Technologies - Introduction.pptx
Advanced IT Governance
Review of recent advances in non-invasive hemoglobin estimation
“AI and Expert System Decision Support & Business Intelligence Systems”
Network Security Unit 5.pdf for BCA BBA.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Bridging biosciences and deep learning for revolutionary discoveries: a compr...

What are Data structures in Python? | List, Dictionary, Tuple Explained | Edureka