Advertisement
g96

Untitled

g96
Feb 15th, 2022
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import csv
  2.  
  3. with open('screen.csv') as f: #A file with a list of all the article titles
  4.     reader = csv.reader(f)
  5.     list1 = list(reader)
  6.  
  7. print(list1)
  8.  
  9. list2 = ["Knowledge Management", "modeling language"] #key words that should contain the artile titles from list1
  10. list2 = [str(x) for x in list2]
  11.  
  12. occur = [i for i in list1  for j in list2 if str(j) in i]
  13.  
  14. print(occur)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement