You are viewing a single comment's thread. Return to all comments →
from datetime import datetime as dt def time_delta(t1, t2): dt1, dt2 = [dt.strptime(x, '%a %d %b %Y %H:%M:%S %z') for x in [t1, t2]] return str(abs(int((dt1 - dt2).total_seconds())))
Seems like cookies are disabled on this browser, please enable them to open this website
Time Delta
You are viewing a single comment's thread. Return to all comments →
To solve this question, concept of datetime module needs to be understood