Python 3.x Python和SQLite3:如何编写比表中的列更少的值

Python 3.x Python和SQLite3:如何编写比表中的列更少的值,python-3.x,sqlite,Python 3.x,Sqlite,我正在使用Python3和SQLite3。我有一个包含6列的表,但我只在其中4列中插入值 执行(“插入值(?,?,?)”,[list_name]) 我得到的错误是: 错误:被列入黑名单的表格有6列,但提供了4个值 列表名称=[(24,‘somestring’、‘2018/05/06’、‘2018-05-13 10:16:34’、(24,‘somestring’、‘2018/05/06’、‘2018-05-13 10:16:34’)] 因此,问题是如何只向其中4列写入内容? 指定: If a co

我正在使用Python3和SQLite3。我有一个包含6列的表,但我只在其中4列中插入值

执行(“插入值(?,?,?)”,[list_name])

我得到的错误是: 错误:被列入黑名单的表格有6列,但提供了4个值

列表名称=[(24,‘somestring’、‘2018/05/06’、‘2018-05-13 10:16:34’、(24,‘somestring’、‘2018/05/06’、‘2018-05-13 10:16:34’)]

因此,问题是如何只向其中4列写入内容?

指定:

If a column-name list is specified, then the number of values in each
term of the VALUE list must match the number of specified columns.
Each of the named columns of the new row is populated with the
results of evaluating the corresponding VALUES expression.
你想要的是:

INSERT INTO blacklisted_ips (col1, col2, col3, col4) VALUES (?, ?, ?, ?)

谢谢你的快速回复。不过,这些值在一个列表中。它还能用吗?
INSERT INTO blacklisted_ips (col1, col2, col3, col4) VALUES (?, ?, ?, ?)