I'm not sure, whether it's an easy problem with easy solution or it's something that needs to dig a little deeper.
Let's say I have an object Item with variables Item.a and Item.b.
Now I have two instances of these objects: Item1 and Item2
What I need is something like this:
for (value_1, value_2) in [(Item1.a, Item2.a), (Item1.b, Item2.b)]:
if value_1 != value_2:
value_1 = value_2
Of course this one is only an example of more complex problem. The substitution is ok, it finds differences between objects and substitutes them. The problem is, that all the time I'm doing it on copies of those variables, not on object references. As soon as it finish the loop, I can print both Item1 and Item2 and they are the same as before loop.
Is there any possibility to pass references into a loop? I know how to do it with lists, but I could not find an answer to objects.