title: In Python3 iterate a dictionary without copying values to local variable, but just a reference or pointer?
body: <p>I understand that to iterate efficiently through a dictionary without making a new copy of the whole dictionary:</p>
  
  <pre><code>for k,v in iter(d.items()):
      print("k={} v={}".format(k,v))  # or do whatever. This is just placeholder code.
  </code></pre>
  
  <p>Q: Is there some way that python3.5.4 can give me the v value directly, as a pointer to it or a reference, rather than copying the value to local variable v in my for loop?  This can help me if v is a large array because each v is a numpy array that has 10^5 or 10^6 elements or even more in my app, and my iterator loop has like millions of iterations.  In other languages I have used references and pointers, but I have not used them (to my knowledge) in python3.5.4.</p>
  
  <p>Thanks for sharing your know-how.</p>
  
  <p>Update:</p>
  
  <p>Here is some numpy python code that I used to prove that v is not a local copy but is a reference to a numpy array.  this is very good news for me. This confirms what the winning answerer said. Thanks to the winning answerer and all other commenters claiming the same.  I am happy about it!! Thanks again to all who participated.</p>
  
  <pre><code>import numpy as np
  x = np.array([8,6,7,5,3,0,9])
  d = {}
  d["mouse"] = x
  for k,v in iter(d.items()):
      v[1] = 2
  print(d)
  </code></pre>
  
  <p>The dictionary now contains a new value in one array location. This means the v[1]=2 line was operating on the original array not a local copy of the array.</p>