Yes.
Import will run the original file as it is.
If you do not want to run it during import and only want to extract functions, rewrite the .py file you are importing so that if__name__=="__main__":
does not contain functions.
Reference:
Python import
© 2024 OneMinuteCode. All rights reserved.