(hours_total)
return ", ".join(strs)
returns a human-readable string representation of some hours

    >>> hours_to_str(1)
    '1 hour'

    >>> hours_to_str(5)
    '5 hours'

    >>> hours_to_str(100)
    '4 days, 4 hours'

    >>> hours_to_str(960)
    '5 weeks, 5 days'

    >>> hours_to_str(961)
    '5 weeks, 5 days, 1 hour'
returns a human-readable string representation of some hours
returns a human - readable string representation of some hours
def hours_to_str(hours_total):
    """returns a human-readable string representation of some hours

    >>> hours_to_str(1)
    '1 hour'

    >>> hours_to_str(5)
    '5 hours'

    >>> hours_to_str(100)
    '4 days, 4 hours'

    >>> hours_to_str(960)
    '5 weeks, 5 days'

    >>> hours_to_str(961)
    '5 weeks, 5 days, 1 hour'
    """

    weeks = int(hours_total / 24 / 7)
    days = int(hours_total / 24) % 7
    hours = hours_total % 24

    strs = []

    if weeks:
        strs.append(
            ngettext("%(weeks)d week", "%(weeks)d weeks", weeks) % {"weeks": weeks}
        )

    if days:
        strs.append(ngettext("%(days)d day", "%(days)d days", days) % {"days": days})

    if hours:
        strs.append(
            ngettext("%(hours)d hour", "%(hours)d hours", hours) % {"hours": hours}
        )

    return ", ".join(strs)
def hours_to_str ( hours_total ) : weeks = int ( hours_total / 24 / 7 ) days = int ( hours_total / 24 ) % 7 hours = hours_total % 24 strs = [ ] if weeks : strs . append ( ngettext ( "%(weeks)d week" , "%(weeks)d weeks" , weeks ) % { "weeks" : weeks } ) if days : strs . append ( ngettext ( "%(days)d day" , "%(days)d days" , days ) % { "days" : days } ) if hours : strs . append ( ngettext ( "%(hours)d hour" , "%(hours)d hours" , hours ) % { "hours" : hours } ) return ", " . join ( strs )