Python, tuples, sequences, and parameterized SQL queries

I ran into a Python error message when using the sqlite3 library: “sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 4 supplied.”

It turned out to be due to a quirk with Python tuples that contain just a single value. This post describes the issue in more detail.