Skip to content

Instantly share code, notes, and snippets.

@ahmedazizkhelifi
Last active August 4, 2020 04:45
Show Gist options
  • Save ahmedazizkhelifi/cecf02a937e285ebc2fd0e5958a9c49f to your computer and use it in GitHub Desktop.
Save ahmedazizkhelifi/cecf02a937e285ebc2fd0e5958a9c49f to your computer and use it in GitHub Desktop.
L = [(1,'Aziz','1980-10-20'),(2,'Khelifi','1990-05-07')]
query = """INSERT INTO Customer
VALUES(?,?,?)"""
c.executemany(query, L)
#executemany is the equivalent of:
for iterable in L:
c.execute(query, iterable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment