title: Python function arguments from MySql database?
body: <p>I have seen data retrieval from MySQL that can be output in the python interpreter, but I'm wondering if it is possible to retrieve some data from a MySQL db that is then used as parameters for a Python function.</p>
  
  <p>Let's pretend I have some function that is:</p>
  
  <pre><code>def doggy(name, goodOrBad, colour, breed):    
      print (name + " is a " + goodOrBad + " boy, who is a " + colour + " " + breed + ".")
  </code></pre>
  
  <p>Given the parameters this outputs something like:</p>
  
  <pre><code>"Max is a good boy who is a chocolate lab."
  </code></pre>
  
  <p>Is it possible to pull data from MySQL tables to use as the parameters for this function? Or should I simply try to pull the pieces of data and then save them in to variables in a separate function and then call "doggy" from the new function with the variables as parameters?</p>
  
  <p>Something like:</p>
  
  <pre><code>def doggyParams():
      a = "Max"
      b = "good"
      c = "chocolate"
      d = "Lab"
  
  
     doggy(a, b, c, d)
  
  doggyParams()
  </code></pre>
  
  <p>I'm not sure if this is possible -- to retrieve the data and then store them as variables? Or if it is a bad idea? </p>
  
  <p>Thanks all, first post here, and I don't <i>think</i> this is a duplicate or repost.</p>
  
  <p>Cheers,
  LC-Data</p>