def moment(X, n, c=0, condition=None, **kwargs):
    return expectation((X - c)**n, condition, **kwargs)
Return the nth moment of a random expression about c i.e. E((X-c)**n)
dataset/ETHPy150Open sympy/sympy/sympy/stats/rv_interface.py/moment