def sum_string_lengths(sequence, m, n):
    """
    What comes in:
      -- A sequence of strings
      -- Integers m and n,
           where 0 <= m <= n < length of the sequence
           (which ensures that you can safely use m and n as indices)
    What goes out:
      Returns the sum of the lengths of the strings
      at indices m to n, inclusive, with the restriction
      that the loop must go thru the sequence BACKWARDS.
    Side effects:   None.
    Examples:
      Suppose that  sequence  is:
        ['five', 'OK', 'songs', 'roxanne', 'the police', '', 'three']
      Then:
        -- sum_string_lengths(sequence, 1, 3)
             returns the length of 'roxanne'
             plus the length of 'songs' plus the length of 'OK',
             which is 7 + 5 + 2, which is 14.

        -- sum_string_lengths(sequence, 2, 6)
             returns the length of 'three'
             plus the length of '' plus the length of 'the police'
             plus the length of 'roxanne' plus the length of 'songs,
             which is 5 + 0 + 10 + 7 + 5, which is 27.
    Type hints:
      :type sequence: list or tuple (of strings)
      :type m: int
      :type n: int
    """
    # ------------------------------------------------------------------
    # EXAMPLE 1.  Iterates through PART of a sequence, BACKWARDS.
    # ------------------------------------------------------------------
    total = 0
    for k in range(n, m - 1, -1):
        s = sequence[k]
        total = total + len(s)

    return total

    # Here is an alternative (there are other alternatives as well):
    total = 0
    for k in range(m, n + 1):
        total = total + len(sequence[m + n - k])

    return total