Код: Выделить всё
# using psycopg2
countryList=['UK','France']
sql='SELECT * from countries WHERE country IN (%s)'
data=[countryList]
cur.execute(sql,data)
Спасибо
Подробнее здесь: https://stackoverflow.com/questions/281 ... -statement
Код: Выделить всё
# using psycopg2
countryList=['UK','France']
sql='SELECT * from countries WHERE country IN (%s)'
data=[countryList]
cur.execute(sql,data)