title: Cannot copy a local variable to result Array
body: <p>It is printing the right values but storing nothing in the result array.
  Here is my code:</p>
  
  <pre><code>def backtrack(result, nums, tempList):
      if len(tempList) == len(nums):
          result.append(tempList)
      else:
          for i in range(0, len(nums)):
              if not tempList.count(nums[i]):
                  tempList.append(nums[i])
                  backtrack(result, nums, tempList)
                  tempList.pop()
  
  nums = [1, 2, 3]
  result = []
  backtrack(result, nums, [])
  print result
  </code></pre>