title: NameError: global name 'result' is no defined
body: <p>Hi I am trying to split my code into 2 python files to make it more tidy. But then, I had an NameError.</p>
  
  <p>Here is my simplified code:</p>
  
  <p>report.py</p>
  
  <pre><code>def report():
   print result
  </code></pre>
  
  <p>master.py</p>
  
  <pre><code>from report import *
  global result
  result = [1,2,3,5,7,9]
  report()   
  </code></pre>
  
  <p>When I run the master.py, I get the NameError: global name 'result' is not defined.
  I have defined it as global, but have no idea why it's still return error.</p>