fork 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 = '{:d}{:d}{:d}'.format(t1.hour, t1.minute, t1.second)
  7. time1 = '{:d}{:d}{:d}'.format(t1.hour, t1.minute, t1.second)
  8. return int(time1) > int(time2)
Success #stdin #stdout 0.02s 28384KB
stdin
Standard input is empty
stdout
Standard output is empty