-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd.py
32 lines (32 loc) · 1.03 KB
/
d.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import g
def Searcher(l1,l2):
for i in l1:
for j in l2:
if i==j:
return True
return False
def getNews(str):
User_input=str.lower()
User_list=User_input.split()
Database=[["tech","technology","techno","technical","take","geek","geeky","gadgets","gadget"],
["sports","sport","sporting","spot","spots",],
["business","money","trade","trading","finance","financial","financing","market","marketing","stocks","stock"],
["football","soccer","sucker","foosball","liga","league"],
["cricket"],
["entertainment","celebs","celebrities"],
["gaming","games","game"],
["science","nature","scientific","natural"],
["aus","australia","aus","aussies"],
["uk","britain","kingdom","england","british",],
["usa","usa","states","america","american"]]
key=[]
for i in Database:
if Searcher(i,User_list):
key.append(i[0])
#print key
if len(key)!=0:
for i in key:
print i
g.main(i)
else:
g.main("general")