Using `executemany` to update entries in an existing SQLite3 database (using Python sqlite3)

后端 未结 2 506
再見小時候
再見小時候 2021-02-14 19:57

I know that executemany can be used to conveniently add new entries to a database; useful to reduce the Python method-call overheads compared to single execut

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-14 20:23

    what you have is perfect except that you should use zip(conts,ids) where conts and ids are lists. This does the rearrangement automatically for you.

提交回复
热议问题