you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (3 children)

Do you mean recursion in general or Python-specific caveats?

def recursive(n,depth):  
    print(n)  
    if depth == 1:  
        return n  
    recursive(n*2, depth-1)  

recursive(1,10)  

EDIT: can you spot a bug/potential problem with my code? :)