String Manipulation in Python
String Manipulation in Python
CHAKRABORTY,PROFESSORTECHNOINDIA
UNIVERSITY
print(c)
Is both Equal:
False Is str1>
str2: True Is
str1< str2: False
Problem Solving and Python 14
Programming
String formatting operator
• String formatting operator % is unique to
strings.
• Example:
print("My name is %s and i secured %d
marks in python” % ("Arbaz",92))
• Output:
My name is Arbaz and i secured 92 marks in
python
Problem Solving and Python 15
Programming
String functions and methods
len() min() max() isalnum() isalpha()
rstrip() strip()
Output:
Output
:
Output:
Find: 7
Count: 3