38016226...@gmail.com wrote:
def rec(a): a+=1 if a<10: rec(a) print(a)rec(0) gives me 10....1 normally.Why it works? Because of the stack memory management?
Yes. There isn't just one 'a' here, there's a different one each time rec is called.
Thank you
-- https://mail.python.org/mailman/listinfo/python-list