(expr)
Returns all RandomSymbols within a SymPy Expression.
Returns all RandomSymbols within a SymPy Expression.
Returns all RandomSymbols within a SymPy Expression .
def random_symbols(expr):
    """
    Returns all RandomSymbols within a SymPy Expression.
    """
    try:
        return list(expr.atoms(RandomSymbol))
    except AttributeError:
        return []
def random_symbols ( expr ) : try : return list ( expr . atoms ( RandomSymbol ) ) except AttributeError : return [ ]