SlideShare a Scribd company logo
3
Most read
5
Most read
6
Most read
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

PPTX
Lists Data Structures and Algorithm.pptx
PPTX
Lists on the pyhton to learn the children more easily on easy codes.pptx
PPTX
Introduction to Python Programming for beginners
PPTX
Datastrucure
PPTX
Python Data Structures and Algorithms.pptx
PPTX
MODULE-2.pptx
PPTX
"Sequences in Python include list, tuple, string, and range"
PPTX
3_Lists.pptxbnchfjgjkghjvghcghchgjhhkhjh
Lists Data Structures and Algorithm.pptx
Lists on the pyhton to learn the children more easily on easy codes.pptx
Introduction to Python Programming for beginners
Datastrucure
Python Data Structures and Algorithms.pptx
MODULE-2.pptx
"Sequences in Python include list, tuple, string, and range"
3_Lists.pptxbnchfjgjkghjvghcghchgjhhkhjh

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

PPTX
tupple.pptx
PPTX
Python Tutorial Part 1
PPTX
Understanding-Python-Data-Structures-A-Comprehensive-Guide.pptx
PPTX
python_module_4....................................
PPTX
Python Data Structures 123 @taylorswift123.pptx
PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
PDF
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
PPTX
Unit 1 array based implementation
PPTX
PYTHON DATA TYPE in python using v .pptx
PPTX
Operations-of-Strings-Lists-Tuples-and-Dictionaries-in-Python (1).pptx
PPT
lecture 02.2.ppt
PPTX
Python data structures (Lists and tuples) presentation
PDF
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
PPTX
data science for engineering reference pdf
PPTX
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
PPTX
Standard template library
PPTX
Unit 2 linear data structures
PPTX
pythondatatypes.pptx
PPTX
Dictionariesasdfghjsdfghjklsdfghjkl.pptx
PPTX
PYTHON DATA TYPE IN PROGRAMMING LANG.pptx
tupple.pptx
Python Tutorial Part 1
Understanding-Python-Data-Structures-A-Comprehensive-Guide.pptx
python_module_4....................................
Python Data Structures 123 @taylorswift123.pptx
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS
INTRODUCTION TO DATA STRUCTURES AND ALGORITHM
Unit 1 array based implementation
PYTHON DATA TYPE in python using v .pptx
Operations-of-Strings-Lists-Tuples-and-Dictionaries-in-Python (1).pptx
lecture 02.2.ppt
Python data structures (Lists and tuples) presentation
BCA DATA STRUCTURES INTRODUCTION AND OVERVIEW SOWMYA JYOTHI
data science for engineering reference pdf
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Standard template library
Unit 2 linear data structures
pythondatatypes.pptx
Dictionariesasdfghjsdfghjklsdfghjkl.pptx
PYTHON DATA TYPE IN PROGRAMMING LANG.pptx
Ad

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
L1 - Introduction to python Backend.pptx
PPTX
history of c programming in notes for students .pptx
PPTX
Transform Your Business with a Software ERP System
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
System and Network Administraation Chapter 3
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
 
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
medical staffing services at VALiNTRY
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Digital Strategies for Manufacturing Companies
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
ai tools demonstartion for schools and inter college
Navsoft: AI-Powered Business Solutions & Custom Software Development
Operating system designcfffgfgggggggvggggggggg
Design an Analysis of Algorithms II-SECS-1021-03
Wondershare Filmora 15 Crack With Activation Key [2025
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
L1 - Introduction to python Backend.pptx
history of c programming in notes for students .pptx
Transform Your Business with a Software ERP System
Softaken Excel to vCard Converter Software.pdf
System and Network Administraation Chapter 3
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
 
How to Choose the Right IT Partner for Your Business in Malaysia
wealthsignaloriginal-com-DS-text-... (1).pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
medical staffing services at VALiNTRY
How to Migrate SBCGlobal Email to Yahoo Easily
Understanding Forklifts - TECH EHS Solution
Digital Strategies for Manufacturing Companies
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
ai tools demonstartion for schools and inter college
Ad

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.