Basically I have the inverse of this problem: Python Time Seconds to h:m:s
I have a string in the format H:MM:SS (always 2 digits for minutes and seconds), and I nee
ts = '1:23:45' secs = sum(int(x) * 60 ** i for i, x in enumerate(reversed(ts.split(':')))) print(secs)