Using Python quick insert many columns into Sqlite\\Mysql
If Newdata is list of x columns, How would get the number unique columns--number of members of first tuple. (Len is not important.) Change the number of "?" to match columns and insert using the statement below. csr = con.cursor() csr.execute('Truncate table test.data') csr.executemany('INSERT INTO test.data VALUES (?,?,?,?)', Newdata) con.commit() By "Newdata is list of x columns", I imagine you mean x tuples , since then you continue to speak of "the first tuple". If Newdata is a list of tuples, y = len(Newdata[0]) is the number of items in the first one of those tuples. Assuming that's the