hello ,
i need a help regarding python programming:
basically i need to find out times between the start and the stop time.
Here is what i have tried---
-
s = raw_input('enter first time (hh:mm:ss ):')
-
z = raw_input('enter the second time (hh:mm:ss):')
-
if ':' in s:
-
h, m, ss = s.split(':')
-
q = int(h)*3600 + float(m)* 60 + float(ss)
-
-
if ':' in z:
-
hh, mm, sss = z.split(':')
-
p = int(hh)*3600 + float(mm)* 60 + float(sss)
Now here i have taken out the value of q and p .
Now how do i take a variable "tm" and compare the time as
q <= tm <= p
and then use the variable tm in my other processing