title: Change in a list in Python when it is called recursively
body: <p>I was solving some problems on a <a href="https://en.wikipedia.org/wiki/Binary_tree" rel="nofollow noreferrer">binary tree</a> and I got stuck in the question <em><a href="https://www.geeksforgeeks.org/lowest-common-ancestor-binary-tree-set-1/" rel="nofollow noreferrer">Lowest Common Ancestor in a Binary Tree | Set 1</a></em>.</p>
  <p>I am using Python to solve the question.</p>
  <p>My question is like in the case where we want to find the common ancestor between 4 and 5, how when the function is called first time [1,2,4] is returned...</p>
  <p>How.... shouldn't 3, 6, 7 be also be appended in the list along with 1,2,4 when (root.right!= None and findPath(root.right, path, k) is called recursively.</p>
  <p>PS: Please refer to the Python code given in the link</p>