title: Accessing Python dict keys with or without dict.keys()
body: <p>Usually I access <code>dict</code> keys using <code>keys()</code> method:</p>
  
  <pre><code>d = {'a':1, 'b':2, 'c':3}
  
  for k in d.keys(): print k
  </code></pre>
  
  <p>But sometimes I see this code:</p>
  
  <pre><code>for k in d: print k
  </code></pre>
  
  <p>Is this code correct? safe?</p>