title: Iterate over a list with floats, and use them in math equations
body: <p>I am trying to iterate over a list with floats and calculate with the items in the lists, but I always get this:</p>
  
  <blockquote>
    <p>list indices must be integers or slices, not float</p>
  </blockquote>
  
  <p>as you can see below, there are lists named <code>t</code>, and <code>sdt</code> which have the same length and are both floats:</p>
  
  <pre><code>for i in t:
      if t[i] == t[0] or t[1] or t[2] or t[3]:
          for i in t[0:4]:
              rp1x = r+h
              rp1y = sdt[i] - .5*(l-w)
              print(rp1x, rp1y)
  </code></pre>