title: How to implement linear interpolation?
body: <p>Say I am given data as follows:</p>
  
  <pre><code>x = [1, 2.5, 3.4, 5.8, 6]
  y = [2, 4, 5.8, 4.3, 4]
  </code></pre>
  
  <p>I want to design a function that will interpolate linearly between <code>1</code> and <code>2.5</code>, <code>2.5</code> to <code>3.4</code>, and so on using Python.</p>
  
  <p>I have tried looking through <a href="http://docs.python.org/tutorial" rel="noreferrer">this Python tutorial</a>, but I am still unable to get my head around it.</p>