title: Multiply floats from two separate lists in Python
body: <p>In my code I have two separate lists. I would like to multiply the value of list[0] by list2[0], list[1] by list2[1] and so on. </p>
  
  <pre><code>value = []
  quantity = []
  
  for line in fh:
      if line.startswith("Value"):
          line = line[18:len(line)]
          line = float(line)
          value.append(line)
  
  for line2 in fh:
      if line2.startswith("Amount"):
          line2 = line2[17:len(line2)]
          line2 = float(line2)
          quantity.append(line2)
  </code></pre>
  
  <p>First I am experiencing a "list index out of range" for my 'quantity' list. Why is that? </p>
  
  <p>To then multiply would something like this work?</p>
  
  <pre><code>total = 0.0
  temp = 0.0
  
  for i in range(len(value))
      temp = value[i]*quantity[i]
      total = total + temp
  </code></pre>