How to trigger function on value change? How to trigger function on value change? python python