SlideShare a Scribd company logo
Python Programming
Unit – III (Part II)
(Lecture 19)
Strings
Python Programming
Unit – III (Part II)
(Lecture 19)
Strings
String Sequence String Length String Traversal
Strings
Lecture 19 Lecture 20
String Sequence
String Length Immutable
Searching
String slicing
String Traversal
String methods
in operator
Looping &
Counting
String Comparison
Lecture 21
Strings
Lecture 19
String Sequence
String Length
String Traversal
String Sequence
• A string is a sequence
of characters.
• You can access the
characters one at a
time with the [ ]
operator
The expression in brackets is
called an index.
Strings
Lecture 19
String Sequence
String Length
String Traversal
String Length
len is a built-in function
that returns the number
of characters in a string
How to find last character in string?
Strings
Lecture 19
String Sequence
String Length
String Traversal
String Traversal
Start at the beginning, select
each character in turn and
continue until the end is
called a traversal.
Strings
Lecture 19
String Sequence
String Length
String Traversal
Python Programming
Unit – III (Part II)
(Lecture 20)
Strings
Python Programming
Unit – III (Part II)
(Lecture 20)
Strings
Immutable Searching
String slicing
Strings
Lecture 19 Lecture 20
String Sequence
String Length Immutable
Searching
String slicing
String Traversal
String methods
in operator
Looping &
Counting
String Comparison
Lecture 21
Strings
Lecture 20
Immutable
Searching
String slicing
String slicing
• A segment of a string is
called a slice.
• The operator [n : m]
returns from the nth
char to the (m-1)th char
Strings
Lecture 20
Immutable
Searching
String slicing
Immutable
Strings are immutable,
which means you can’t
change an existing string.
Strings
Lecture 20
Immutable
Searching
String slicing
Searching
• It takes a character and finds
the index where that character
appears.
• If the character is not found,
the function returns -1
Strings
Lecture 20
Immutable
Searching
String slicing
Python Programming
Unit – III (Part II)
(Lecture 21)
Strings
Python Programming
Unit – III (Part II)
(Lecture 21)
Strings
Looping &
Counting
String methods in operator String Comparison
Strings
Lecture 19 Lecture 20
String Sequence
String Length Immutable
Searching
String slicing
String Traversal
String methods
in operator
Looping &
Counting
String Comparison
Lecture 21
Strings
String methods
in operator
Looping &
Counting
String Comparison
Lecture 21
Looping & Counting
Strings
String methods
in operator
Looping &
Counting
String Comparison
Lecture 21
String methods
• A method is similar to a
function.
• It takes arguments and
returns a value
Strings
String methods
in operator
Looping &
Counting
String Comparison
Lecture 21
in operator
• The word in is a Boolean
operator that takes two
strings.
• if the first string appears
as a substring in the
second: returns True
Strings
String methods
in operator
Looping &
Counting
String Comparison
Lecture 21
String Comparison
Strings
String methods
in operator
Looping &
Counting
String Comparison
Lecture 21
Python Programming
Unit – III (Part III)
(Lecture 22)
Case Study
Lecture 22
Reading word lists
Search
Looping with
indices
Case Study
Reading word lists
Lecture 22
Reading word lists
Search
Looping with
indices
Case Study
Search
Search
Lecture 22
Reading word lists
Search
Looping with
indices
Case Study
Looping with indices
L E V E L
Lecture 22
Reading word lists
Search
Looping with
indices
Case Study

More Related Content

What's hot (10)

PDF
Java and Data Structure (June - 2014) [Revised Course | Question Paper]
Mumbai B.Sc.IT Study
 
PPT
Model and Design
Dr Shashikant Athawale
 
PPTX
Towards advanced data retrieval from learning objects repositories
Valentina Paunovic
 
PPTX
Boyer moore algorithm
AYESHA JAVED
 
PPT
Perform brute force
SHC
 
PDF
Lec12-CS110 Computational Engineering
Sri Harsha Pamu
 
PPT
04 brute force
Hira Gul
 
PPTX
finite automata
sabiya sabiya
 
PPTX
Strings numbers prints
aiclub_slides
 
PDF
String matching, naive,
Amit Kumar Rathi
 
Java and Data Structure (June - 2014) [Revised Course | Question Paper]
Mumbai B.Sc.IT Study
 
Model and Design
Dr Shashikant Athawale
 
Towards advanced data retrieval from learning objects repositories
Valentina Paunovic
 
Boyer moore algorithm
AYESHA JAVED
 
Perform brute force
SHC
 
Lec12-CS110 Computational Engineering
Sri Harsha Pamu
 
04 brute force
Hira Gul
 
finite automata
sabiya sabiya
 
Strings numbers prints
aiclub_slides
 
String matching, naive,
Amit Kumar Rathi
 

Similar to Python Programming | JNTUA | UNIT 3 | Strings | (20)

PDF
Strings brief introduction in python.pdf
TODAYIREAD1
 
PPTX
Engineering string(681) concept ppt.pptx
ChandrashekarReddy98
 
PPTX
Chapter 11 Strings and methods [Autosaved].pptx
geethar79
 
PPTX
Strings.pptx
Yagna15
 
PPTX
trisha comp ppt.pptx
Tapaswini14
 
PPTX
"Strings in Python - Presentation Slide"
altacc1921
 
PDF
Strings in Python
Vikram Nandini
 
PPTX
Detailed description of Strings in Python
Keerthiraja11
 
PPTX
Chapter 11 Strings.pptx
afsheenfaiq2
 
PPTX
"Strings in Python - Presentation Slide"
altacc1921
 
PPTX
Chapter 14 strings
Praveen M Jigajinni
 
PDF
Python programming : Strings
Emertxe Information Technologies Pvt Ltd
 
PDF
Python Lecture Slides topic strings handling
MuhammadIfitikhar
 
PPTX
06-Strings.pptx
RaviAr5
 
PPTX
String Manipulation in Python
Pooja B S
 
PPT
PPS_Unit 4.ppt
KundanBhatkar
 
PPTX
Lexture about strings, all examples and theoretical part is included
abzalbekulasbekov
 
PPT
Strings_Unit 3 .ppt
hrithikexams
 
PPTX
DATA TYPES IN PYTHON jesjdjdjkdkkdk.pptx
rajvishnuf9
 
PPTX
chapte_6_String_python_bca_2005_computer
hansibansal
 
Strings brief introduction in python.pdf
TODAYIREAD1
 
Engineering string(681) concept ppt.pptx
ChandrashekarReddy98
 
Chapter 11 Strings and methods [Autosaved].pptx
geethar79
 
Strings.pptx
Yagna15
 
trisha comp ppt.pptx
Tapaswini14
 
"Strings in Python - Presentation Slide"
altacc1921
 
Strings in Python
Vikram Nandini
 
Detailed description of Strings in Python
Keerthiraja11
 
Chapter 11 Strings.pptx
afsheenfaiq2
 
"Strings in Python - Presentation Slide"
altacc1921
 
Chapter 14 strings
Praveen M Jigajinni
 
Python programming : Strings
Emertxe Information Technologies Pvt Ltd
 
Python Lecture Slides topic strings handling
MuhammadIfitikhar
 
06-Strings.pptx
RaviAr5
 
String Manipulation in Python
Pooja B S
 
PPS_Unit 4.ppt
KundanBhatkar
 
Lexture about strings, all examples and theoretical part is included
abzalbekulasbekov
 
Strings_Unit 3 .ppt
hrithikexams
 
DATA TYPES IN PYTHON jesjdjdjkdkkdk.pptx
rajvishnuf9
 
chapte_6_String_python_bca_2005_computer
hansibansal
 
Ad

More from FabMinds (20)

PPTX
Python Programming | JNTUA | UNIT 3 | Lists |
FabMinds
 
PPTX
Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration |
FabMinds
 
PPTX
Python Programming | JNTUA | UNIT 2 | Case Study |
FabMinds
 
PPTX
Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
FabMinds
 
PPTX
Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion |
FabMinds
 
PPTX
Application layer protocols
FabMinds
 
PPTX
Internet connectivity
FabMinds
 
PPTX
Introduction for internet connectivity (IoT)
FabMinds
 
PPTX
web connectivity in IoT
FabMinds
 
PPTX
message communication protocols in IoT
FabMinds
 
PPTX
web communication protocols in IoT
FabMinds
 
PPTX
introduction for web connectivity (IoT)
FabMinds
 
PPTX
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
FabMinds
 
PPTX
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
FabMinds
 
PPTX
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
FabMinds
 
PPTX
Data enrichment
FabMinds
 
PPTX
Communication technologies
FabMinds
 
PPTX
M2M systems layers and designs standardizations
FabMinds
 
PPTX
Business models for business processes on IoT
FabMinds
 
PPTX
Python Programming | JNTUK | UNIT 1 | Lecture 5
FabMinds
 
Python Programming | JNTUA | UNIT 3 | Lists |
FabMinds
 
Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration |
FabMinds
 
Python Programming | JNTUA | UNIT 2 | Case Study |
FabMinds
 
Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
FabMinds
 
Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion |
FabMinds
 
Application layer protocols
FabMinds
 
Internet connectivity
FabMinds
 
Introduction for internet connectivity (IoT)
FabMinds
 
web connectivity in IoT
FabMinds
 
message communication protocols in IoT
FabMinds
 
web communication protocols in IoT
FabMinds
 
introduction for web connectivity (IoT)
FabMinds
 
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
FabMinds
 
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
FabMinds
 
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
FabMinds
 
Data enrichment
FabMinds
 
Communication technologies
FabMinds
 
M2M systems layers and designs standardizations
FabMinds
 
Business models for business processes on IoT
FabMinds
 
Python Programming | JNTUK | UNIT 1 | Lecture 5
FabMinds
 
Ad

Recently uploaded (20)

PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PDF
Geographical diversity of India short notes by sandeep swamy
Sandeep Swamy
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Horarios de distribución de agua en julio
pegazohn1978
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
Geographical diversity of India short notes by sandeep swamy
Sandeep Swamy
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
Controller Request and Response in Odoo18
Celine George
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 

Python Programming | JNTUA | UNIT 3 | Strings |