Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import zip_longest
- list_values = range(37000) # big yoba data
- howmany = 1000
- for values in zip_longest(fillvalue=0, *[iter(list_values)] * howmany):
- cursor.executemany("""INSERT INTO my_table VALUES(%s);""", values)
- db.commit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement