title: modify a python list from C++
body: <p>I got a Python list which I can obtain its pointer and pass this pointer address to C++ to work on</p>
  
  <pre><code>MyPointer = TheList.as_pointer()
  </code></pre>
  
  <p>now I pass this address to C++ with ctypes</p>
  
  <p>in C++ I can do the following:</p>
  
  <pre><code>*(float*) MyPointer = 2.0f; //for example
  </code></pre>
  
  <p>and the Python values will update immediatly,now the problem is:
  how to extend or delete some values (like modify the list directly from C++)
  as I sense these data are a <code>std::vector</code> how to do <code>push_back</code> and so on to adjust size with a fast way (as iterating in Python is pretty much SLOW)</p>