I'm trying to build a table columns according to a user request (the size of the list may change, that's why I can't determine an exact number of question marks):
userInput=[a,b,c,d,e,f,g]
ct.execute('CREATE TABLE IF NOT EXISTS chars(?)',(userInput))
I get the following error:
sqlite3.OperationalError: near "?": syntax error
?expects only one element but you have many elements.WHERE,ON,VALUES(), andIN()clauses. You will need to concatenate list values to SQL string.