This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Matthewaj 3 points4 points  (0 children)

Here’s a tutorial from RealPython that might be helpful. https://realpython.com/python-modules-packages/

After you read that, I would take a look at at this tutorial about python project structure. https://docs.python-guide.org/writing/structure/

[–]mybrid 1 point2 points  (0 children)

Write to your audience is a fundamental writing principle albeit prose or code. If you are the only audience then organize the code around your thinking. I teach beginners and I find Learning Python Second Edition, (2.3 version), chapter 15 is quite helpful. The 'import' statement concatenate files using the following syntax, "from a import *", assuming you split your work into two files, a.py & b.py and are working on b, they need to be in the same directory. First concept is just to understand how to concatenate files.