list storing variables

ast nomail at invalid.com
Mon Feb 23 07:55:47 EST 2015


hi

>>> a = 2; b = 5
>>> Li = [a, b]
>>> 
>>> Li
[2, 5]
>>> a=3
>>> Li
[2, 5]
>>> 

Ok, a change in a or b doesn't impact Li. This works as expected

Is there a way to define a container object able to store some variables 
so that a change of a variable make a change in this object content ?

I dont need this feature. It is just something I am thinking about.

In C language, there is &A for address of A




More information about the Python-list mailing list