title: Python equivalent of PHP mysql_fetch_array
body: <p>I would like to fetch an array in MySQL. Can someone please tell me how to use Python using MySQLdb to do so?</p>
  
  <p>For example, this is what I would like to do in Python:</p>
  
  <pre><code>&lt;?php
  
    require_once('Config.php'); 
  
    $q = mysql_query("SELECT * FROM users WHERE firstname = 'namehere'");
    $data = mysql_fetch_array($q);
    echo $data['lastname'];
  
  ?&gt;
  </code></pre>
  
  <p>Thanks.</p>