Advertisement
Alelluja

Untitled

Dec 22nd, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. f = open("plik.txt")
  2. l = f.readlines()
  3.  
  4. searched_keyword = "a"
  5. countLines = 0
  6.  
  7. print("Searched Keyword: " + searched_keyword + "\n")
  8. for line in l:
  9.     countLines += 1
  10.     if searched_keyword in line:
  11.         print("Tekst: " + line + "Line: " + str(countLines))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement