Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csv
- with open('screen.csv') as f: #A file with a list of all the article titles
- reader = csv.reader(f)
- list1 = list(reader)
- print(list1)
- list2 = ["Knowledge Management", "modeling language"] #key words that should contain the artile titles from list1
- list2 = [str(x) for x in list2]
- occur = [i for i in list1 for j in list2 if str(j) in i]
- print(occur)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement