I have a list that has 3 rows each representing a table row:
>>> print list [laks,444,M] [kam,445,M] [kam,445,M]
How to insert thi
there's a better way
# Larger example rows = [('2006-03-28', 'BUY', 'IBM', 1000, 45.00), ('2006-04-05', 'BUY', 'MSOFT', 1000, 72.00), ('2006-04-06', 'SELL', 'IBM', 500, 53.00)] c.executemany('insert into stocks values (?,?,?,?,?)', rows) connection.commit()