M
M
Medelin02018-04-06 22:23:12
Python
Medelin0, 2018-04-06 22:23:12

How to track the value of a variable?

Here, for example, there is x = 0. I want to write a function that will start its work when x changes. It seems that everything is simple, for example:

х = 0
у = x
if x != y:  
    function()

but it doesn't work, when x changes, y also changes, as a result, the function never starts

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question