Python Recursion Handling -
i have recursively traverse objects inside list.
def function(): object in list: if object.field none: // stuff here else: function(object.field) return
the problem i'm facing python doesn't object inside list, instead return every time meet " object.field != none " . want return when loop over, until object inside list done.
can explain me way this?
you're calling function again when object.field
none
. first block of if
run when object.field != none
. else
run when object.field == none
.
Comments
Post a Comment