Commit 21b64c7d authored by root's avatar root

loops 1 in advanced

parent 5667ce2e
import sys
string="""Hello world python
hi hello
This is python"""
query=sys.argv[1]
lines=string.split("\n")
for lineIndex,line in enumerate(lines):
words=line.split(" ")
for wordIndex,word in enumerate(words):
if query==word:
print wordIndex,lineIndex
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment