python hours minutes seconds code example Example: minutes to seconds python >>> import datetime >>> str(datetime.timedelta(seconds=666)) '0:11:06'