def histogram(s):
    """
    Returns a histogram (dictionary) of the # of letters
    in string s.

    The letters in s are keys, and the count of each letter
    is the value. If the letter is not in s, then there is
    NO KEY for it in the histogram.

    Example: histogram('') returns {},
             histogram('all') returns {'a':1,'l':2}
             histogram('abracadabra') returns
                {'a':5,'b':2,'c':1,'d':1,'r':2}

    Parameter s: The string to analyze
    Precondition: s is a string (possibly empty).
    """
    # DICTIONARY COMPREHENSION
    #return { x:s.count(x) for x in s }

    # ACCUMULATOR PATTERN
    result = {}
    for x in s:
        result[x] = s.count(x)
    return result