I have written a python file a.py
like this:
x = 1
def hello():
print x
hello()
When I do import a
, it is printing the value of x
Till now my understanding is import
will include the variables and function definitions but why it is executing the method hello()
?