I\'d like to use string substitution for a comma-separated list, such as:
query = \"\"\"SELECT id, name, image_id FROM users WHERE id IN (%
For me it worked this way:
cursor.execute(sql, (pids_list,))
and I made sure that elements of the pids_list are integers and not strings.