substitut vaill

print(y.subs(x, 41))  # 42
Homely Hoopoe