fork(1) download
  1. #do it without if statements
  2. def is_after(t1, t2):
  3. """takes two time objects
  4. returns True if t1 follows t2 chronologically
  5. """
  6. time1 = ''.join(str(t1.hour)).join(str(t1.minute)).join(str(t1.second))
  7. time2 = ''.join(str(t2.hour)).join(str(t2.minute)).join(str(t2.second))
  8. return int(time1) > int(time2)
Success #stdin #stdout 0.02s 27624KB
stdin
Standard input is empty
stdout
Standard output is empty