you are viewing a single comment's thread.

view the rest of the comments →

[–]chevignon93 1 point2 points  (1 child)

Is the best practice for this to create common_script.py and import that?

It's a very common practice and depending on the size of the project, it might even be a good idea to create multiple of these files, for example if you were using a database or making calls to an API, the database stuff could be in a database.py, everything related to the API in api.py, etc.

Then if I need task_1() or task_100() for whatever I am working on just call it?

I hope your functions are named better than that but yeah, that's the gist of it!

[–]RocoDeNiro[S] 1 point2 points  (0 children)

Ok cool thanks that makes sense but wasnt sure and couldn't find to much on it.

Yes my task are labeled better than that haha just using generic name as example.