def histogram(word):
    """ Return a dictionary with a letter as its keys and its values as the number
        of occurrences of that letter appearing in <word>.


    :type word: str
    :rtype: {str: int}

    >>> histogram('parrot') ==  {'a': 1, 'o': 1, 'p': 1, 'r': 2, 't': 1}
    True

    """
    d = {}
    for letters in word:
        d[letters] = d.get(letters, 0) + 1
    return d


if __name__ == '__main__':
    import doctest
    doctest.testmod()

8843543ab91b0bde3e2d8eb109a1c6bee87dc0f6
<mask token>

def histogram(word):
    """ Return a dictionary with a letter as its keys and its values as the number
        of occurrences of that letter appearing in <word>.


    :type word: str
    :rtype: {str: int}

    >>> histogram('parrot') ==  {'a': 1, 'o': 1, 'p': 1, 'r': 2, 't': 1}
    True

    """
    d = {}
    for letters in word:
        d[letters] = d.get(letters, 0) + 1
    return d


<mask token>

def histogram(word):
    """ Return a dictionary with a letter as its keys and its values as the number
        of occurrences of that letter appearing in <word>.


    :type word: str
    :rtype: {str: int}

    >>> histogram('parrot') ==  {'a': 1, 'o': 1, 'p': 1, 'r': 2, 't': 1}
    True

    """
    d = {}
    for letters in word:
        d[letters] = d.get(letters, 0) + 1
    return d


if __name__ == '__main__':
    import doctest
    doctest.testmod()
