Find the output of the following:
word = 'work hard
result = word.find('work')
print("Substring, 'work', found at index:", result)
result = word.find('har')
print("Substring, 'har', found at index:", result)
if (word.find('pawan') != -1):
print("Contains given substring")
else:
print("Doesn't contain given substring")
Answers
Answered by
0
Answer:
I think substring, work
Similar questions
Business Studies,
3 months ago
Social Sciences,
3 months ago
India Languages,
3 months ago
Sociology,
6 months ago
English,
6 months ago
Social Sciences,
11 months ago
Math,
11 months ago
Hindi,
11 months ago