I am using SQLITE3.
In my SQL Table, I have a table of 50 columns, and I would like to put in each column each value of My_List, which has 50 elements.
Is there any way to code a loop in python to put my data in my table ? I tried to find it out but didn't get anything...
My current code for 3 variables instead of 50 is:
import sqlite3
conn = sqlite3.connect("testdatabase.db")
c.execute('''CREATE TABLE mytable (Column1 text, Column2 text, Column3,
text) ''')
c.execute('''INSERT INTO mytable (Column1, Column2, Column3) VALUES (?,
?, ?)''', (myliste[0], myliste[1], myliste[2])
conn.commit()
Thank you very much.
Lcs