[Tutor] How to convert seconds to hh:mm:ss format

alain Delon racgomi at yahoo.com
Thu Feb 16 22:46:14 CET 2012


userName = raw_input("Enter your name ")
     print "hi " + userName + ". \n "
     seconds = input("Enter the number of seconds since midnight:")
     hours = seconds/3600
     hoursRemain = hours%60
     minutes = hoursReamain/60
     secondsRemain = minutes%60
     print "hours: " + "minutes: " + "seconds"


I'm going to be crazy. Please give me a hand. Thank you very much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120216/b94e9801/attachment.html>


More information about the Tutor mailing list