以下作品:
>>> cursor.execute("select * from sqlitetable where rowid in (2,3);")
Run Code Online (Sandbox Code Playgroud)
以下不是:
>>> cursor.execute("select * from sqlitetable where rowid in (?) ", [[2,3]] )
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
Run Code Online (Sandbox Code Playgroud)
有没有办法传入python列表而不必先将其格式化为字符串?