My script calculate the difference in 2 time. Like this:
lasted = datetime.strptime(previous_time, FMT) - datetime.strptime(current_time, FMT)
That fractional second bit is sometimes unwanted from a timedelta. A quick truncate of that fractional bit with a split and discard:
a = datetime.now() b = datetime.now() - a
then
str(b).split('.')[0]
(assuming applications where fraction of a second is irrelevant to you)