title: Why does Python run my code bottom to top?
body: <p>Assume these 3 files:</p>
  
  <p><strong>charNames.py</strong></p>
  
  <pre><code>  a = 'Susan'
    b = 'Charlie'
    c = 'Jiji'
  </code></pre>
  
  <p><strong>threenames.py</strong></p>
  
  <pre><code>a = 'dead'
  b = 'parrot'
  c = 'sketch'
  print a,b,c
  </code></pre>
  
  <p><strong>storytime.py</strong></p>
  
  <pre><code>#!/usr/bin/env python
  import charNames
  import threenames
  
  print charNames.a
  threenames
  </code></pre>
  
  <hr>
  
  <p>I run <code>storytime.py</code> (which is also chmod +x) by using <code>./storytime.py</code> from Terminal, this is the output that I get:</p>
  
  <pre><code>$ ./storytime.py 
  dead parrot sketch
  Susan
  $ 
  </code></pre>
  
  <p>Why does the result execute <code>print a,b,c</code> from <em>threenames.py</em> before it runs <code>print charNames.a</code>?</p>
  
  <p>From my understanding, Python is a top down programming language, like bash. So should it print "Susan" first, then "dead parrot sketch"?</p>
  
  <p>This is run on OSX, with Python 2.7.5</p>