title: Fitting 3D points python
body: <p>I have python code that produces a list of 3-tuples of numbers x, y and z. I would like to fit z= f(x,y) using scipy curve_fit.   Here is some non-working code</p>
  
  <pre><code>A = [(19,20,24), (10,40,28), (10,50,31)]
  
  def func(x,y,a, b):
      return x*y*a + b
  </code></pre>
  
  <p>How can I get python to fit this function to the data in the list <code>A</code>?</p>