sec = int(input("Enter a number if second: ")) mins, seconds = divmod(sec, 60) hrs, mins = divmod(mins, 60) print(sec, "seconds is %dh %02dm %02ds" % (hrs, mins, seconds))