title: How to change an element in a list and keep it that way forever in the code?
body: <p>I already know how to change an element of a list into another one:</p>
  
  <pre><code>data = ["foo","bar","baz"]
  for i in xrange(len(data)):
      if data[i] == "foo":
          data[i] = "baa"
  print data
  </code></pre>
  
  <p>and the output is:</p>
  
  <pre><code>['baa', 'bar', 'baz']
  </code></pre>
  
  <p>but the item in the code I'm writing still hasn't changed; it still is "foo", the only change I can see is in the output.</p>
  
  <p>I have a much bigger code which needs to change an item on the list based on user input. How do I keep a huge list and keep changing it (without actually touching the code)?</p>