Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

recursion in python

def yourFunction(arg):
    #you can't just recurse over and over, 
    #you have to have an ending condition
    if arg == 0:
        yourFunction(arg - 1)
        
    return arg
Source by www.datacamp.com #
 
PREVIOUS NEXT
Tagged: #recursion #python
ADD COMMENT
Topic
Name
3+3 =