So, I'm quite new to python, and I tried to import a function that I had written in one of my files into another file that I was working on.
Here is the code in the file that I'm trying to import the function from:
def print_me(x):
return 2 * x
print(print_me(5))
Here is the code in my other file:
from question2 import print_me
print(print_me(5))
Now when I run my second file, the answer (10) gets printed twice. I want to know the reason why my print function in my first file (from which I imported my function) also gets executed.