import os
d = {}
with open("time.txt") as f:
for line in f:
(key, val) = line.split()
d[int(key)] = val
print (d)
I have days.txt and time.txt so how to create dictionary from the two file.
days.txt
Mo Tu We Th Fr
time.txt
19:00 18:00 16:00 20:00 23:00
My expected output is
"Mo": 19:00
"Tu": 18:00
"We": 16:00
"Th": 20:00
"Fr": 23:00