Forums

Strings spanning multiple lines of code

I can't get the following code to work. Any suggestions?

sqlStr = ("INSERT INTO Table1(var1,var1,var1,var1, var1, var1," "var1, var1,var1, var1) " "VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) " )

cursor.execute(sqlStr,([var1],[var2],[var3],[var4],[var5], [var6],[var7],[var8],[var9],[var10] ))

I don't think you want each of your variables to be wrapped in a list in the execute command.