-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask2
More file actions
27 lines (24 loc) · 772 Bytes
/
task2
File metadata and controls
27 lines (24 loc) · 772 Bytes
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
import json
json_file=open("data.json","r")
data=json.load(json_file)
json_file.close()
check={'Monday':{},'Tuesday':{},"Wednesday":{},'Thursday':{},'Friday':{}}
for lis in data:
a,b,c = lis
sm=0
for k,v in c['conference-categories-count'].items():
sm=sm+v
#print(sm)
if a['dow'] == "Monday":
check['Monday'].update({b['time']:sm})
elif a['dow'] == "Tuesday":
check['Tuesday'].update({ b['time']:sm})
elif a['dow'] == "Wednesday":
check['Wednesday'].update({ b['time']:sm})
elif a['dow'] == "Thursday":
check['Thursday'].update({ b['time']:sm})
elif a['dow'] == "Friday":
check['Friday'].update({b['time']:sm})
#print(check)
for k,v in check.items():
print(k + " ===> " + str(v))