How to change the object that is referenced by a variable?
<p>I have an array of objects. I am interested in writing a function that will find a specific object in a list and return a reference to it. </p>

<p>Imagine the following code snippet was possible:</p>

<pre><code>list1 = [1,2,3]
def find(q):
    return q[0]
a = find(list1) 
a = 0 # This should change the object that "a" is referencing to.
print list1 # [0, 2, 3] is desired as result.
</code></pre>

<p>It is easy to do with pointers in C++, but how can I do it in python?</p>
