title: store sql result in a variable in python
body: <p>I need help in storing the query result in a variable after executing the select statement. this is my code below.. there are no error but i need help in storing it in a variable in PYTHON. i am using pymssql and python 2.7.9. thanks in advance</p>
  
  <pre><code>conn = pymssql.connect(host='localhost', user='xx', password='xx', database='dbpython')
      c = conn.cursor()
      row = c.execute("select fid, fname, lname, contact from tblcontact where fname='maiji'")
      row = c.fetchall()
      while row:
          print row
          row = c.fetchall()
  </code></pre>