all I want to do is send a query like
SELECT * FROM table WHERE col IN (110, 130, 90);
So I prepared the following statement
For example, if you want the sql query:
select * from table where col in (110, 130, 90)
What about:
my_list = [110, 130, 90] my_list_str = repr(my_list).replace('[','(').replace(']',')') cur.execute("select * from table where col in %s" % my_list_str )