Python function management methods

Asked 2 years ago, Updated 2 years ago, 112 views

There are so many functions created while programming with Python that it becomes difficult to manage

In general Python programming, each function (or function that performs similar actions) is used

Do you save it in a separate .py file and use import in a file that acts as main?

 For example, define the functions func1 and func2 in func1.py and func2.py

I wonder if import func1 and import func2 are saved in main.py.

 Also, I wonder if programming in this way reduces program efficiency.

python function

2022-09-22 19:22

1 Answers

I think it would be good to study about class and module


2022-09-22 19:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.