How can I convert the results from Mysql query to a list in python? Here is what I've tried so far
import MySQLdb as mdb
con = mdb.connect('localhost', 'root', 'root', 'sample_db');
with con:
cur = con.cursor()
cur.execute("SELECT site_id FROM positive_outcomes")
for i in range(cur.rowcount):
row = cur.fetchone()
print row[0]