forked from kartikcode/Page-Scraper-PClub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck.py
37 lines (27 loc) · 999 Bytes
/
check.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
33
34
35
36
import csv
import re
from string import ascii_letters, digits,ascii_lowercase
import json
file_j = json.loads(open('students.json').read())
with open('org_info.csv','r') as csv_file:
csv_reader = csv.reader(csv_file)
next(csv_reader)
for line in csv_reader:
name = line[0]
list1=name.split(' ')
if(len(name.split(' '))<2):
continue
if set(name).difference(ascii_letters + " "):
continue
if(not(set(name).difference(ascii_lowercase + " "))):
continue
for person in file_j:
list2 = person['n'].split(' ')
list3 = person['n'].split(' ')
if list1==list2 or list1==list3:
print("Name: "+name)
print("Roll No: "+person['i'])
print("Branch: "+person['d'])
print("Organisation: "+ line[1])
print("Project: "+ line[2])
print()