SlideShare a Scribd company logo
16
Most read
20
Most read
22
Most read
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Python Sequences
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
➢ What are sequences?
➢ Sequence Operations
➢ Types of Sequences in Python
➢ Lists
➢ Tuples
➢ Strings
➢ Sets
➢ Dictionaries
Agenda
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
What are Sequences?
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
What Are Sequences?
➢ Sequences are containers with items that are accessible by indexing or slicing.
➢ The built-in len function takes any container as an argument and returns the number of items in the container.
Sequence of Cars
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Sequences Operations
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Sequence Operations
Sequences of Cars
Concatenation Repetition Membership Testing Slicing Indexing
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Sequence Concatenation and Repetition
Sequence of Cars
Concatenation Repetition
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Sequence Membership Testing
Sequence of Cars
Membership Testing
Not a member Is a member
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Sequence Indexing
Sequence of Cars
Indexing
Index 0 Index 1 Index 2 Index 3 Index 4 Index 5 Index 6 Index 7
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Sequence Slicing
Sequence of Cars
Slicing
[ index 1 – index 4 ]
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Types of Sequences in Python
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Sequences In Python
Lists
Tuples
Strings
Sets
Dictionaries
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Lists
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Lists
Fruits = ['Mango', 'Apple', 'Grapes'] List.append(elem)
List.insert(index,elem)
List.extend(list2)
List.index(elem)
List.remove(elem)
List.sort()
List.reverse()
Append
Extend
Insert
Index
Remove
Sort
Reverse
The list is a most versatile datatype available in Python which can be written as a list of comma-separated
values (items) between square brackets. Important thing about a list is that items in a list need not be of
the same type.
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Tuples
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Tuples
➢ A tuple is a sequence of immutable Python objects.
➢ Tuples are sequences, just like lists. The differences between tuples and lists are, the
tuples cannot be changed unlike lists and tuples use parentheses.
Fruits = ('Mango', 'Apple', 'Grapes‘)
Tuple.index(elem)Index
Tuple.count(elem)Count
Tuple1+Tuple2Concatenation
Tuple[range]Slicing
Tuple * xRepetition
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Strings
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Strings
➢ We can create them simply by enclosing characters in quotes.
➢ Python treats single quotes the same as double quotes.
Fruits = 'Mango Apple Grapes'
String[range]
Updating
Slicing
Concatenation
Reverse
Repetition
Membership
String[range] + ‘x’
String 1 + String 2
String 1 * x
In, not in
String [:-1]
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Sets
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Sets
➢ A set contains an unordered collection of unique and immutable objects.
➢ The set data type is, as the name implies, a Python implementation of the
sets as they are known from mathematics.
A BA B
A B
C
(A C) / B (B C) / A
C
Fruits = {'Mango', 'Apple', 'Grapes‘}
Slicing
Add Element
Clear
Copy
Difference
Discard
Remove
Intersection
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Dictionaries
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Dictionaries
➢ Dictionary is an unordered collection of key-value pairs.
➢ It is generally used when we have a huge amount of data.
Example:
Length
del d [K]
Membership Testing
Key
Value
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Session In A Minute
What are Sequences? Lists
Strings Sets
Tuples
Dictionaries
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Thank You …
Questions/Queries/Feedback

More Related Content

PPT
Introduction to Python
PPSX
Programming with Python
PPTX
Data Structures in Python
PDF
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
PPTX
Python Tutorial Part 1
PPTX
Chapter 06 constructors and destructors
PPTX
CLASS OBJECT AND INHERITANCE IN PYTHON
PDF
Python Basics | Python Tutorial | Edureka
Introduction to Python
Programming with Python
Data Structures in Python
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Tutorial Part 1
Chapter 06 constructors and destructors
CLASS OBJECT AND INHERITANCE IN PYTHON
Python Basics | Python Tutorial | Edureka

What's hot (20)

PPT
Introduction to Python
PDF
Datatypes in python
PDF
Python Loops Tutorial | Python For Loop | While Loop Python | Python Training...
PDF
Python programming : Classes objects
PDF
Python functions
PDF
Python set
PPTX
Fundamentals of Python Programming
PDF
Arrays in python
PPTX
Functions in python slide share
PDF
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
PPTX
Data types in python
PPTX
String Manipulation in Python
PPTX
Python basics
PDF
Immutable vs mutable data types in python
PPTX
Python strings presentation
PDF
Python programming : Strings
PPTX
Python programming | Fundamentals of Python programming
PPTX
Python dictionary
PPTX
Python for loop
PDF
Python Variable Types, List, Tuple, Dictionary
Introduction to Python
Datatypes in python
Python Loops Tutorial | Python For Loop | While Loop Python | Python Training...
Python programming : Classes objects
Python functions
Python set
Fundamentals of Python Programming
Arrays in python
Functions in python slide share
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Data types in python
String Manipulation in Python
Python basics
Immutable vs mutable data types in python
Python strings presentation
Python programming : Strings
Python programming | Fundamentals of Python programming
Python dictionary
Python for loop
Python Variable Types, List, Tuple, Dictionary
Ad

Similar to Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | Python Training | Edureka (20)

PDF
Python Programming | Python Programming For Beginners | Python Tutorial | Edu...
PPTX
Basic of Python- Hands on Session
PDF
software construction and development.pdf
PDF
Python Programming Language | Python Classes | Python Tutorial | Python Train...
PPTX
PYTHON ppt for 2 nd year students very useful
PPTX
Python-Intorduction to coding Technology.pptx
PDF
PROGRAMMING _ Intro-Walk into Python.pdf
PDF
Introduction To Python | Edureka
PDF
Python Programming
PDF
Python Interview Questions And Answers 2019 | Edureka
PDF
Theperlreview
PDF
Python Programming Course Presentations
PDF
What is Tuple in python? | Python Tuple Tutorial | Edureka
PPTX
14-Python-Concepts for data science.pptx
PPTX
trisha comp ppt.pptx
PDF
Variables & Data Types In Python | Edureka
PPTX
1664611760basics-of-python-for begainer1 (3).pptx
PDF
Python Interview Questions PDF By ScholarHat.pdf
PDF
perl course-in-mumbai
PDF
perl course-in-mumbai
Python Programming | Python Programming For Beginners | Python Tutorial | Edu...
Basic of Python- Hands on Session
software construction and development.pdf
Python Programming Language | Python Classes | Python Tutorial | Python Train...
PYTHON ppt for 2 nd year students very useful
Python-Intorduction to coding Technology.pptx
PROGRAMMING _ Intro-Walk into Python.pdf
Introduction To Python | Edureka
Python Programming
Python Interview Questions And Answers 2019 | Edureka
Theperlreview
Python Programming Course Presentations
What is Tuple in python? | Python Tuple Tutorial | Edureka
14-Python-Concepts for data science.pptx
trisha comp ppt.pptx
Variables & Data Types In Python | Edureka
1664611760basics-of-python-for begainer1 (3).pptx
Python Interview Questions PDF By ScholarHat.pdf
perl course-in-mumbai
perl course-in-mumbai
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
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
1. Introduction to Computer Programming.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Getting Started with Data Integration: FME Form 101
PPT
Teaching material agriculture food technology
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Machine learning based COVID-19 study performance prediction
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
Group 1 Presentation -Planning and Decision Making .pptx
Encapsulation_ Review paper, used for researhc scholars
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Network Security Unit 5.pdf for BCA BBA.
The Rise and Fall of 3GPP – Time for a Sabbatical?
1. Introduction to Computer Programming.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Assigned Numbers - 2025 - Bluetooth® Document
“AI and Expert System Decision Support & Business Intelligence Systems”
Getting Started with Data Integration: FME Form 101
Teaching material agriculture food technology
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Machine learning based COVID-19 study performance prediction
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MIND Revenue Release Quarter 2 2025 Press Release

Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | Python Training | Edureka