title: Python Overwriting List Element
body: <p>Is there a quick and easy way that is not computationally expensive to overwrite an element in a list corresponding to an element in another list (of the same length)?</p>
  
  <pre><code>iterates = input("How many iterates: ")
  trials = input("How many trials: ")
  
  aggregateList = [iterates]
  
  def function():
      recordList = []
  
      for i in range(iterates):
          # math goes here
          recordList.append()
  
      aggregateList[i] += recordList[i]
  
  for i in range(trials):
      function()
  </code></pre>
  
  <p>The problem is coming from <code>aggregateList[i] += recordList[i]</code>Any ideas on something else that will work? Say the value in recordList[i] is 5 for the first "iteration", 5 for the second, 5 for the third, at this time aggregateList[i] should be 15.</p>