Python reference variable and object

python variables or object change its value if we change the value of its reference but sometime not why? if possible then please provide some notes or explain it.