SlideShare a Scribd company logo
1 of 7
COLLECTIONS
Presented To:
Presented By: Deeksha
Table of contents
What are Collections in Python?
List
Tuple
Set
What are Collections in Python?
• Collections in Python are like containers used for
storing data and are commonly known as data
structures, such as lists, tuples, set, dictionaries,
etc.
• Python has a built-in collections module providing
additional data structures for collections of data.
• The Python collection was first introduced in the
Python 2.4 version.
List
• List is a collection of data, where we can represent a
group of values as a single entity.
• We separate the items with commas(,) and keep all
the items of the entire list in square brackets[ ].
• In list data type insertion order is preserved.
• Duplicate values are allowed.
• Heterogeneous objects are allowed.
• List data type is mutable.
• Append method is applicable.
• It is possible to use index elements.
• Slice operation is also applicable.
Tuple
• It is same as list data type, but tuple is immutable.
• Once a tuple is created, no changes can be made to it.
• In this, instead of square brackets[ ], parenthesis( ) is used .
• Index and slicing are allowed.
Set
• Set is an unordered collection of items (insertion order
is not preserved).
• In set each element is unique, there is no duplicate
element.
• Set elements can be represent within curly braces{ }.
• Set is mutable, we can use add and remove methods.
• Heterogeneous objects are allowed.
• Index and slice operators are not applicable.
Thankyou.

More Related Content

Similar to Python Collections - List, Tuple and Set.

BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHIBCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHISowmya Jyothi
 
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptxQ-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptxkalai75
 
Standard template library
Standard template libraryStandard template library
Standard template librarySukriti Singh
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structuresSenthil Murugan
 
Python programming
Python programmingPython programming
Python programmingsirikeshava
 
Data structure chapter 1.pptx
Data structure chapter 1.pptxData structure chapter 1.pptx
Data structure chapter 1.pptxKami503928
 
Brixon Library Technology Initiative
Brixon Library Technology InitiativeBrixon Library Technology Initiative
Brixon Library Technology InitiativeBasil Bibi
 
Data Structure & Algorithm.pptx
Data Structure & Algorithm.pptxData Structure & Algorithm.pptx
Data Structure & Algorithm.pptxMumtaz
 
Lists, Stacks, and Queues: Abstract Data Types
Lists, Stacks, and Queues: Abstract Data TypesLists, Stacks, and Queues: Abstract Data Types
Lists, Stacks, and Queues: Abstract Data TypesHasan Dwi Cahyono
 
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptxPYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptxsurajnath20
 

Similar to Python Collections - List, Tuple and Set. (20)

BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHIBCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
 
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptxQ-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
 
Standard template library
Standard template libraryStandard template library
Standard template library
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structures
 
pythondatatypes.pptx
pythondatatypes.pptxpythondatatypes.pptx
pythondatatypes.pptx
 
Intro to Lists
Intro to ListsIntro to Lists
Intro to Lists
 
unit 1.pptx
unit 1.pptxunit 1.pptx
unit 1.pptx
 
Standard template library
Standard template libraryStandard template library
Standard template library
 
Python programming
Python programmingPython programming
Python programming
 
Tuples.pptx
Tuples.pptxTuples.pptx
Tuples.pptx
 
Lists python.pptx
Lists python.pptxLists python.pptx
Lists python.pptx
 
set.pptx
set.pptxset.pptx
set.pptx
 
Internship.pptx
Internship.pptxInternship.pptx
Internship.pptx
 
Data structure chapter 1.pptx
Data structure chapter 1.pptxData structure chapter 1.pptx
Data structure chapter 1.pptx
 
Brixon Library Technology Initiative
Brixon Library Technology InitiativeBrixon Library Technology Initiative
Brixon Library Technology Initiative
 
Data Structure & Algorithm.pptx
Data Structure & Algorithm.pptxData Structure & Algorithm.pptx
Data Structure & Algorithm.pptx
 
Python Data-Types
Python Data-TypesPython Data-Types
Python Data-Types
 
Phython presentation
Phython presentationPhython presentation
Phython presentation
 
Lists, Stacks, and Queues: Abstract Data Types
Lists, Stacks, and Queues: Abstract Data TypesLists, Stacks, and Queues: Abstract Data Types
Lists, Stacks, and Queues: Abstract Data Types
 
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptxPYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
 

Recently uploaded

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Recently uploaded (20)

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 

Python Collections - List, Tuple and Set.

  • 2. Table of contents What are Collections in Python? List Tuple Set
  • 3. What are Collections in Python? • Collections in Python are like containers used for storing data and are commonly known as data structures, such as lists, tuples, set, dictionaries, etc. • Python has a built-in collections module providing additional data structures for collections of data. • The Python collection was first introduced in the Python 2.4 version.
  • 4. List • List is a collection of data, where we can represent a group of values as a single entity. • We separate the items with commas(,) and keep all the items of the entire list in square brackets[ ]. • In list data type insertion order is preserved. • Duplicate values are allowed. • Heterogeneous objects are allowed. • List data type is mutable. • Append method is applicable. • It is possible to use index elements. • Slice operation is also applicable.
  • 5. Tuple • It is same as list data type, but tuple is immutable. • Once a tuple is created, no changes can be made to it. • In this, instead of square brackets[ ], parenthesis( ) is used . • Index and slicing are allowed.
  • 6. Set • Set is an unordered collection of items (insertion order is not preserved). • In set each element is unique, there is no duplicate element. • Set elements can be represent within curly braces{ }. • Set is mutable, we can use add and remove methods. • Heterogeneous objects are allowed. • Index and slice operators are not applicable.