Hi
Please can someone help me spot the problem with this code:
Please can someone help me spot the problem with this code:
import sqlite3 conn = sqlite3.connect("Table example.db") c = conn.cursor() def createTable (): c.execute("CREATE TABLE Example(Language TEXT)") def enterDynamicData (lang): c.execute ("INSERT INTO Example VALUES(?)",(lang)) conn.commit () #createTable () lang=input("Lang: ") enterDynamicData (lang)Error code
Error:Traceback (most recent call last):
File "C:/Users/Eitan/Dropbox/Python/Code/Table creation.py", line 15, in <module>
enter_dynamic_data()
File "C:/Users/Eitan/Dropbox/Python/Code/Table creation.py", line 11, in enter_dynamic_data
c.execute("INSERT INTO example(Language) VALUES(?)",(lang))
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 3 supplied.