title: what does the exec keyword do in python?
body: <pre><code>code = compile('a = 1 + 2', '&lt;string&gt;', 'exec')
  exec code
  print a
  3
  </code></pre>
  
  <p>How it prints 3?, Can anybody tell me the exact working of it?</p>