def make_readable(seconds): m, s = divmod(seconds, 60) h, m = divmod(m, 60) return ‘%02d:%02d:%02d‘ % (h,m,s)
divmod函数:本函数是实现a除以b,然后返回商与余数的元组。
时间函数(秒转为特定格式)
原文:http://www.cnblogs.com/dreamyu/p/7602889.html