I've read the following posts:
Importing Module or From Module Import
And I was just wondering how to know when to break-up my code into multiple files versus putting many functions in one file? My specific problem here is that I have a function with 100 lines that I want to call in the for-loop of another function. Also, when are scripts executed? When you import them, or when you call them?
Note: The answers below have fully solved the problem. Thank you!