I have created an package called Logic and inside Logic package i have put module called calculator.py
login: ->calculator.py
calculator.py:-
print("Inside Calculator") def add(a,b): print(a+b)
but when i am trying to import calculator module from logic it will print Inside Calculator statement only at one time
-from logic import calculator
Inside Calculator
In above output it will print an Inside Calculator statement only at one time i want to print it whenever calculator module get import.
1.4m articles
1.4m replys
5 comments
57.0k users