from humanfriendly import format_timespan secondsPassed = 1302 format_timespan(secondsPassed) # '21 minutes and 42 seconds'