I am using mysql connector.Python 1.0.9 downloaded from MySQL site.
I have a sample table here
DROP TABLE IF EXISTS my_table; CREATE TABLE my_table (id
Another option is to use executemany, as follows:
sql=('insert into articulos (descripcion, precio) values(%s,%s)') data=[('naranjas',22), ("pomelos", 29), ("frutillas", 130)] cursor.executemany(sql,data)