Last active
September 8, 2017 20:58
-
-
Save Hemalatah/f26988baf1d34fae4f6d1313f2973803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def search_text(text, keyword): | |
i = 0 | |
while(i < len(text)): | |
line = '' | |
while not (text[i] == '.'): | |
line += text[i] | |
i += 1 | |
print line | |
line = line.split(' ') | |
if keyword in line: | |
print ' '.join(line) | |
i += 2 | |
search_text(text, 'iPhone') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment