Python Forum
Call functions recursively in tree structure using python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Call functions recursively in tree structure using python (/thread-16146.html)



Call functions recursively in tree structure using python - dubru - Feb-15-2019

I am new to python, I need to call functions recursively in tree structure.

I am calling the python function in in for loop by passing A, this will produce the output B in first loop and C in second loop.

here I need to run the same function for B and C, so here B will generate D and E and C will generate F and next Run same python function for D it will generate G so on, I have to run the same until I get null.

How can I write the logic in python


RE: Call functions recursively in tree structure using python - nilamo - Feb-15-2019

What have you tried? Show us some code, so we can see how to help.