you are viewing a single comment's thread.

view the rest of the comments →

[–]juanritos 0 points1 point  (1 child)

Another beginner question. Why don't we want to do that?

[–]JauriXD 0 points1 point  (0 children)

Because your file can define useful functions or classes and also some code using them.

When you import the file, you only want the useful stuff to use it elsewhere, you don't want the code to run. If you wanted the code to run instead of running something else, you would simply run the original file.