title: What is the python keyword "with" used for?
body: <p>What is the python keyword "with" used for?</p>
  
  <p>Example from: <a href="http://docs.python.org/tutorial/inputoutput.html" rel="noreferrer">http://docs.python.org/tutorial/inputoutput.html</a></p>
  
  <pre><code>&gt;&gt;&gt; with open('/tmp/workfile', 'r') as f:
  ...     read_data = f.read()
  &gt;&gt;&gt; f.closed
  True
  </code></pre>