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...
ODP
Python course Day 1
PPT
02python.ppt
PPT
Data types usually used in python for coding
PPT
02python.ppt
PDF
Python Basics it will teach you about data types
PPTX
Tuple in python
PPTX
Sequence Types in Python Programming
PPTX
PRESENTATION ON TUPLES.pptx
PDF
Tuple in Python class documnet pritened.
PDF
Python Is Very most Important for Your Life Time.
PDF
Processing data with Python, using standard library modules you (probably) ne...
PPTX
Intro Python Data Structures.pptx Intro Python Data Structures.pptx
PPTX
Python programming UNIT III-Part-2.0.pptx
PPTX
‏‏chap6 list tuples.pptx
PDF
PPT
Getting started in Python presentation by Laban K
PPTX
Python Datatypes by SujithKumar
PPTX
UNIT-3 python and data structure alo.pptx
PDF
Python revision tour II
Python Programming | Python Programming For Beginners | Python Tutorial | Edu...
Python course Day 1
02python.ppt
Data types usually used in python for coding
02python.ppt
Python Basics it will teach you about data types
Tuple in python
Sequence Types in Python Programming
PRESENTATION ON TUPLES.pptx
Tuple in Python class documnet pritened.
Python Is Very most Important for Your Life Time.
Processing data with Python, using standard library modules you (probably) ne...
Intro Python Data Structures.pptx Intro Python Data Structures.pptx
Python programming UNIT III-Part-2.0.pptx
‏‏chap6 list tuples.pptx
Getting started in Python presentation by Laban K
Python Datatypes by SujithKumar
UNIT-3 python and data structure alo.pptx
Python revision tour II
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
Tartificialntelligence_presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Encapsulation theory and applications.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
1. Introduction to Computer Programming.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Machine learning based COVID-19 study performance prediction
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
A Presentation on Artificial Intelligence
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Spectroscopy.pptx food analysis technology
Tartificialntelligence_presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Encapsulation theory and applications.pdf
A comparative analysis of optical character recognition models for extracting...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Diabetes mellitus diagnosis method based random forest with bat algorithm
1. Introduction to Computer Programming.pptx
Unlocking AI with Model Context Protocol (MCP)
Big Data Technologies - Introduction.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Machine learning based COVID-19 study performance prediction
“AI and Expert System Decision Support & Business Intelligence Systems”
A Presentation on Artificial Intelligence
Assigned Numbers - 2025 - Bluetooth® Document
20250228 LYD VKU AI Blended-Learning.pptx
Programs and apps: productivity, graphics, security and other tools
Mobile App Security Testing_ A Comprehensive Guide.pdf
Spectroscopy.pptx food analysis technology

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