0

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?

2
  • 2
    Put the functions into modules that you import Commented Jan 2, 2019 at 20:47
  • 1
    In the same file? Not nice and neatly like you can with prototypes in C. Functions should be defined before usage. Commented Jan 2, 2019 at 20:47

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.