Do not end it with anything. So
ex:= A+B:
to enter expressions, and then
substitute(ex, $A = C$)
to act with an algorithm without showing output. The logic being that the latter is simply a Python statement, and statements by default do not show output.