I am facing problem in writing PostgreSQL select statement in Python when I have to pass more than one values in a statement. Below is the sample example.
from sqlalchemy import create_engine
values = [ 'a' , 'b' ]
con = create_engine(conn_string)
results = con.execute( "select * from table where var in (%s)", [ values ] )
I am able to run query with single value but getting format error for an array.