def time cfile start end start int re sub start split -1 end int re su

1
2
3
4
5
6
7
8
9
def time(cfile, start, end):
a = []
start = int(re.sub(":","",start.split("T")[1]))-1
end = int(re.sub(":","", end.split("T")[1]))+1
for line in open(cfile):
linear = line.split(" ")
if start < int(re.sub(":","",linear[0].split("T")[1])) < end:
a.append(a.append(" ".join(line)))
return a