• [deleted]
    + 0 comments

    To solve this question, concept of datetime module needs to be understood

    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())))