Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = open("plik.txt")
- l = f.readlines()
- searched_keyword = "a"
- countLines = 0
- print("Searched Keyword: " + searched_keyword + "\n")
- for line in l:
- countLines += 1
- if searched_keyword in line:
- print("Tekst: " + line + "Line: " + str(countLines))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement