I am aware that with the timedelta function you can convert seconds to h:m:s using something like:
>> import datetime >> str(datetime.timedelta(s
I'm not even sure I'd bother with timedelta for this
>>> pseconds = lambda hms:sum(map(lambda a,b: int(a)*b,hms.split(':'),(3600,60,1))) >>> pseconds('0:11:06') 666