I trying to use sqlite3 query like this one:
books = c.execute("SELECT * FROM books WHERE id IN (?)", session["cart"])
Where session["cart"] is a dynamic list.
For example:
session["cart"] = ['1', '7']
I get an error as given in title while trying to execute it.
How may I insert whole list in the question mark placeholder? I can't use multiple question marks, because their number may vary.
Does anyone has any clue? Or maybe better idea how to achieve so?