def insert(array): connection=sqlite3.connect(\'images.db\') cursor=connection.cursor() cnt=0 while cnt != len(array): img = array[cnt]
cursor.execute(sql,array)
Only takes two arguments. It will iterate the "array"-object and match ? in the sql-string. (with sanity checks to avoid sql-injection)