1method = a
2import datetime
3str(datetime.timedelta(seconds=666))
4'0:11:06'
5
6method = b
7def convert(seconds):
8 seconds = seconds % (24 * 3600)
9 hour = seconds // 3600
10 seconds %= 3600
11 minutes = seconds // 60
12 seconds %= 60
13 return "%d:%02d:%02d" % (hour, minutes, seconds)