Q. Write the output of the following:
(a)
string = "Hello Madam, I love Tutorials"
substring = "Madam"
if string.find(substring) != -1:
print ("Python found the substring!")
else:
print ("Python did NOT find the substring!")
(b)
s = "Strings in Python"
print (s.capitalize())
print (s.title())
s6 = s.replace("in", "data type")
print (s6)
Answer :-
a =
Python found the substring!
>>>
b =
Strings in python
Strings In Python
Strdata typegs data type Python
>>>
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )