program name: String lookup
input: plays
3
Raju is going to school
Teja plays cricket
car has four wheels
output: 2
str2search = input()
n = int(input())
L = []
for i in range(n):
line = input()
if str2search in line:
L.append(i+1)
for i in L:
print(i, end=' ')
Comments
Leave a comment