(seq)
return dict(rv)
Return the hashable sequence in multiset form with values being the
    multiplicity of the item in the sequence.

    Examples
    ========

    >>> from sympy.utilities.iterables import multiset
    >>> multiset('mississippi')
    {'i': 4, 'm': 1, 'p': 2, 's': 4}

    See Also
    ========
    group
Return the hashable sequence in multiset form with values being the
    multiplicity of the item in the sequence.
Return the hashable sequence in multiset form with values being the multiplicity of the item in the sequence .
def multiset(seq):
    """Return the hashable sequence in multiset form with values being the
    multiplicity of the item in the sequence.

    Examples
    ========

    >>> from sympy.utilities.iterables import multiset
    >>> multiset('mississippi')
    {'i': 4, 'm': 1, 'p': 2, 's': 4}

    See Also
    ========
    group
    """
    rv = defaultdict(int)
    for s in seq:
        rv[s] += 1
    return dict(rv)
def multiset ( seq ) : rv = defaultdict ( int ) for s in seq : rv [ s ] += 1 return dict ( rv )