Answer to Question #301686 in Python for Jyothi

Question #301686

program name: String lookup

input: plays

3

Raju is going to school

Teja plays cricket

car has four wheels


output: 2


1
Expert's answer
2022-02-23T12:18:48-0500
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=' ')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS