title: why does my for loop not edit the global list I and looping through and editing?
body: <p>There is probably a matching question out there. I have a globally defined list and I am trying to iterate through the list and edit certain elements by using specific if statements. My problem is that when I print the list before the loop and when I print the list afterwards they are still the same.</p>
  
  <p>I've considered using enumerate to manually edit list["enumerated number"] using the numbers connected to the element but this seems clumsy.</p>
  
  <pre><code>print(list)
  for el in list:
      print(el)
      if el &lt; 1:
          el = 0
      elif el &gt; 1:
          el = 2
  print(list)
  </code></pre>
  
  <p>I am hoping to get an output that is the top list edited according to the if statements.</p>