def timedelta_to_seconds(td):
 return (td.seconds + (((td.days * 24) * 60) * 60))

def timedelta_to_seconds ( td ) : return ( td . seconds + ( ( ( td . days * 24 ) * 60 ) * 60 ) )
converts a timedelta instance to seconds .