'values must be a list of tuples'

def insertMany(self, table_name, values, keys=None):

    questions = (u'?,' * len(values[0]))
    if (keys is None):
        sql = (u'INSERT    INTO    %s    VALUES    (%s);' % (table_name, questions[:(-1)]))
    else:
        sql = (u'INSERT    INTO    %s    %s    VALUES    (%s);' % (table_name, tuple(keys), questions[:(-1)]))
    self.executemany(sql, values)
