title: Get a pointer to a list element
body: <p>I was wondering if it was possible to get a "pointer" to an element in a python list. That way, I would be able to access my element directly without needing to know my element's index. What I mean by that is that in a list, you can add elements anywhere; at the start, in the middle or even at the end, yet the individual elements aren't moved from their actual memory location. In theory, it should be possible to do something like:</p>
  
  <p><code>myList = [1]</code></p>
  
  <p><b>[1]</b></p>
  
  <p><code>element = &amp;myList[0]</code></p>
  
  <p>element would act as a pointer here.</p>
  
  <pre><code>myList.insert(0, 0)
  myList.append(2)
  </code></pre>
  
  <p><b>[0, 1, 2]</b></p>
  
  <p>At this point, I would still be able to access the element directly even though it's index within the list has changed.</p>
  
  <p>The reason I want to do this is because in my program, it would be way too tedious to keep track of every item I add to my list. Each item is generated by an object. Once in a while, the object has to update the value, yet it can't be guaranteed that it will find its item at the same index as when it was added. Having a pointer would solve the problem. I hope that makes sense.</p>
  
  <p>What would be the right way to do something like that in Python?</p>