[Python] How can I substitute multiple symbols in an expression in sympy?

Discussão em 'Python' iniciado por Stack, Setembro 13, 2025.

  1. Stack

    Stack Membro Participativo

    Assigning a variable directly does not modify expressions that used the variable retroactively.

    >>> from sympy import Symbol
    >>> x = Symbol('x')
    >>> y = Symbol('y')
    >>> f = x + y
    >>> x = 0

    >>> f
    x + y

    Continue reading...

Compartilhe esta Página