Jeg er enig i Otto Allmendingers svar, men for at udtrykke Denis Otkidachs kommentar, her er, hvordan du kan iterere over resultaterne uden at bruge Ottos fetch() funktion:
import MySQLdb.cursors
connection=MySQLdb.connect(
host="thehost",user="theuser",
passwd="thepassword",db="thedb",
cursorclass = MySQLdb.cursors.SSCursor)
cursor=connection.cursor()
cursor.execute(query)
for row in cursor:
print(row)