def symbols_to_prob(symbols):
    '''
    Return a dict mapping symbols to  probability.

    input:
    -----
        symbols:     iterable of hashable items
                     works well if symbols is a zip of iterables
    '''
    myCounter = Counter(symbols)

    N = float(len(list(symbols)))   # symbols might be a zip object in python 3

    for k in myCounter:
        myCounter[k] /= N

    return myCounter
Return a dict mapping symbols to  probability.

    input:
    -----
        symbols:     iterable of hashable items
                     works well if symbols is a zip of iterables