Q:

Why does it show the same value after changing a variable?

I write this code:
a=5
b=4
s=a*b
print(s)
20

then I changed variable "a" to 6:
a=6
print(s)
20

I changed variable "a" and when i say print(a) it shows new variable(6) but when I say print(s) it shows the same number(20) 
I wonder why this happens. I expected it shows me s=24 but why it shows 20 again?

A:

This is a very reasonable question to ask. The reason it does not change is that s gets the result of the calculation a*b, and does not represent the actual function a*b. This is just how python works and can be different from other languages. 
You can achieve something similar to what you want by using a lambda:
a=5
b=4
s=lambda: a*b
print(s()) # prints 20
a=6
print(s()) # prints 24

note that you will have to call the lamdba using s(). 

