Chapter 5 Engstring Manipulation
Chapter 5 Engstring Manipulation
Chapter 5 Engstring Manipulation
By-
Neha Tyagi
PGT CS
KV 5 Jaipur II Shift
Jaipur Region
2. By taking Input
Output
word = “RESPONSIBILITY”
word[ 0 : 14 ] will result into‘RESPONSIBILITY’
word[ 0 : 3] will result into‘RES’
word[ 2 : 5 ] will result into‘SPO’
word[ -7 : -3 ] will result into‘IBIL’
word[ : 14 ] will result into‘RESPONSIBILITY’
word[ : 5 ] will result into ‘RESPO’
word[ 3 : ] will result into ‘PONSIBILITY’
slice() Neha
creates a slice Tyagi,specified
object KV 5 Jaipur
byIIrange()
Shift
Assignment
1. WAP to print the following pattern
1. INDIA 2. I
INDI IN
IND IND
IN INDI
I INDIA
2. WAP to search a substring from a given line of string.
www.pythontrends.wordpress.com