Hi Barış,
It isn't a bug!
Unfortunately as soon as you execute x=5 you destroy the symbol in x, replacing it by 5 .
That means that y.subs(x,10) becomes
(x**3).subs(5,3)
No replacements are possible, so this return x**3
Then you set x to 3 so that y.subs(x,125) becomes
(x**3).subs(3,125) which yields
x**125
etc.
The correct code would be
x=symbols('x')
y=x**3
y.subs(x,5)
y.subs(x,10)
etc.
Notice that y never needed to be a variable, because you never
used it - y got overwritten just as x did.
If you want to store an expression like x**3 in a python
variable, I find it useful to use a longer name that wouldn't
normally be used in a mathematical expression. If you set up a
variable as a symbol, then it is best not to assign to it later
until perhaps you understand what is going on.
Cheers,
David