Computer Science, asked by priyankajha1145, 5 months ago

1)Write a program to read a string and find out a word is present in that string and also print starting index of the word using strstr().

Answers

Answered by RuwaisnZaid
0

Explanation:

STR = INPUT("ENTER A STRING..")

WORD = INPUT("ENTER A STRING")

M = STR.SPLIT()

FOR I IN M:

IF I==WORD:

PRINT ("WORD IS PRESENT INS STRING")

PRINT(M[0])

Similar questions