I am new to python, and I tried writing a function but it says it is not defined, so I tried using it after declaring it, and it worked. I program in C and there I just put function prototype and it's all good. Is there any nice way to do this in python as well? or do I really need to think about the order that I am writing the function? cause it sounds pretty stupid if you have a huge code with 100 functions that uses each other what do you do?
-
2Put the functions into modules that you importUnholySheep– UnholySheep2019-01-02 20:47:18 +00:00Commented Jan 2, 2019 at 20:47
-
1In the same file? Not nice and neatly like you can with prototypes in C. Functions should be defined before usage.ltd9938– ltd99382019-01-02 20:47:32 +00:00Commented Jan 2, 2019 at 20:47
Add a comment
|