title: Change values in a list using a for loop (python)
body: <p>I currently have some code that reads like this:</p>
  
  <pre><code>letters = {
  10 : "A",
  11 : "B",
  12 : "C",
  13 : "D",
  14 : "E",
  15 : "F"
  }
  vallist = [rd1, rd2, gd1, gd2, bd1, bd2]
  for i in vallist:
      if i &gt;= 10:
          i = letters[i]
  </code></pre>
  
  <p>What I want to happen is the for loop to iterate through <code>vallist</code> and replace any value that is greater than 10 with its corresponding letter. However, my current code just changes <code>i</code> and not the original value in the list. For example, if <code>rd1</code> is set to 15, the code runs through and <code>i</code> is set to <code>"F"</code>, but <code>rd1</code> does not change to <code>"F"</code>, and instead just stays as 15. How can I fix this?</p>