Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Module 2: Collection

Dr. Anu Singha


Assistant Professor, Faculty of Engineering and Technology
Sri Ramachandra University, Chennai.

1
Topics to be covered
 Strings
 Lists
 Tuples
 Dictionaries
Strings
Continue…
Continue…
Tutorials
Continue…
Continue…
Indexing and Slicing
Continue…
Continue…
Continue…
String Properties and Functions

• Concatenation or Merging
• Upper
• Lower
• Replace
• Searching/Find
• Split
• and so on.
Continue…
Concatenation or Merging

• The + operator lets you combine two or more strings in Python. This operator
is referred to as the Python string concatenation operator. The + operator
should appear between the two strings you want to merge.
Continue…
Continue…
Upper, lower, split, replace, find, and so on
Continue…
Continue…
Continue…
String Formatting for Printing
Continue…

Placeholder
Continue…
Continue…
Continue…
f-string method
Continue…
Loops and String

In Python, while operating with String, one can do multiple operations on


it through loop. Let’s see how to iterate over characters of a string in
Python.
Continue…

You might also like