How does Python handles the case when two functions call each other?
-
def func1(): #do something call func2() #do something def func2(): #do something call func1() #do something In this case it will raise an error that func2 is not defined.
-
Answer:
In python your function definition should appear in code before it is being called so you get an error. First define func2, then define func1 then no error.
K Dheeraj Kumar Reddy at Quora Visit the source
Related Q & A:
- Are these two functions equal?Best solution by Mathematics
- What is the moble network when u can call all the networks?Best solution by Yahoo! Answers
- When Should I Call back about my Job Application?Best solution by Yahoo! Answers
- When will McDonalds call me back after the interview?Best solution by Yahoo! Answers
- When should I call back about a job?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.