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