I have two files, file1 and file2.
files 2 is this:
print "Why is this printing"
var = 7
file 1 is this:
from file2 import var
print var
When I run this code, it outputs the following:
Why is this printing
7
Is there a way I can obtain var
from file2
without running the code above the declaration of var
?