0
How many functions can another function call?
Say that I have 4 functions and another function, but that one function acts as an initializer where basically, the work of that function is to keep the program running by calling those 4 functions. Is there a limit to the number of functions I can call in one function? Is it a common practice to do that? For example: def one(): pass def two(): pass def three(): pass def four(): pass def start(): one() two() three() four() start()
4 ответов
+ 3
No there is no limit
You can call multiple functions from one function👍
+ 3
Yeah man, that's functional programming for ya. And not really a limit, but at some point, you'd want to make that one shorter! so you break it into a few seperate functions with all your added functions, then just call the few you made.
+ 1
Not exactly, but just take a look at this code. Forget all the nonsense at the top and look at the bottom at the method process_invoice() with all the other method calls. It's just a way to make the code easier to understand and change because you dont have to rewrite everything, you can change a specific thing your program does, while minimizing code written
https://code.sololearn.com/c3WuqNK0IlqP/?ref=app
0
I see, so it's something like, my start() function will only call four() and inside four() function, it calls three() and so on.