title: Python - Best way to lookup values in a table-like scheme
body: <p>I have a client who wants a way to calculate shipping costs. It's calculated by weight and kilometer (not linear unfortunately). It looks like this:</p>
  
  <pre><code>|           | To 50km   | To 100km  | To 150km  | To 200km  |
  |-------    |---------  |---------- |---------- |---------- |
  | 10kg      | 84€       | 95€       | 104.45€   | 116€      |
  | 20kg      | 98€       | 108.50€   | 117.10€   | 127.20€   |
  | 30kg      | 112.40€   | 121.20€   | 129.95€   | 149.30€   |
  </code></pre>
  
  <p>I'd love to lookup a value by calling a function like this <code>calc_shipping_costs(range, weight)</code>, so for example <code>calc_shipping_costs(100, 20)</code> and then receive <strong>108.50€</strong></p>
  
  <p>What's the best method to do so?</p>