Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. import re
  2. file1 = open('6.txt','r')
  3. file2 = open('vyborka.txt','r')
  4. vyborka = [line.strip() for line in file2]
  5.  
  6. count = 0
  7. for line in file1.readlines():
  8.     for word in line.lower().split():
  9.         if word in vyborka:
  10.             count += 1
  11. print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement