title: List Manipulation in Mathematica pertaining to Lagrange Interpolation Polynomials in Mathematica
body: <p>I am trying to use a list which is passed to a function in such a way that I can</p>
  
  <ul>
  <li>get the length of that list</li>
  <li>get the individual x and y values to manipulate</li>
  </ul>
  
  <p>The list I am trying to manipulate can be seen below:</p>
  
  <pre><code>dataTan = Table[{x, Tan[x]}, {x, -1.5, 1.5, .75}];
  </code></pre>
  
  <p>this question is a sort of a follow-up to the question seen <a href="https://stackoverflow.com/questions/8410379/conditional-product-mathematica">here</a>.  I eventually want to write my own function in mathematica that generates the Lagrange Interpolation polynomial for a given set of points </p>
  
  <pre><code> {{x0, y0}, ... , {xn, yn}}
  </code></pre>
  
  <p>I need some way to access the points above so that I may utilize the code below:</p>
  
  <pre><code>Sum[Subscript[y, j]*Product[If[j != m, (x - Subscript[x, m])/
         (Subscript[x, j] - Subscript[x, m]), 1], {m, 0, k}], {j, 0, k}]
  </code></pre>