I want to create a list of variables in Python, where the items in the lists are variables and when I change the variables, the items in the list change as well. For example:
a = 5
someList.append(a)
a = 3
someList
someList[0.value()]
Output:
[a]
[3]
ADDENDUM
Why do I want to do this?
Because I want to search for the minimum across a few sorted arrays of different sizes. At some point, the iterator pointer of one of the arrays becomes a null pointer and I want to remove that array from the list of arrays I am searching across.
The only way I can see to do that is to be able to create a list of variables that point to these arrays, so they can be removed when no longer relevant.
a. You could hack something similar together, but this is definitely a case where the result you want will be obtainable in a better way.0.value()indexing syntax. I'm with the others though in saying there's probably a better way to solve the problem that you are trying to address here.