def time cfile start end start int re sub start split end int re sub e

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
def time(cfile, start, end):
a = []
start = int(re.sub(":","",start.split("T")[1]))
end = int(re.sub(":","", end.split("T")[1]))
for line in open(cfile):
time = line.split(" ")[0].split("T")[1].split(".")[0].split(":")
time = int(time[0]+time[1])
if start <= time <= end and line != None:
print line
a.append(line)
print a
return a