このようなもので試してみてください:
filter ="History,Romance,Business & Money".split(',')
sqlcommand = "SELECT * FROM book WHERE scrape_category IN ({0})".format(
', '.join(['%s'] * len(filter)))
print(sqlcommand)
cursor.execute(sqlcommand, filter)
このようなもので試してみてください:
filter ="History,Romance,Business & Money".split(',')
sqlcommand = "SELECT * FROM book WHERE scrape_category IN ({0})".format(
', '.join(['%s'] * len(filter)))
print(sqlcommand)
cursor.execute(sqlcommand, filter)