What do you want to save?
Add Code snippet
New code examples
-
SQL 2021-10-13 16:28:04
bulk insert mysql from list of tuples
#function to transform your list into a string def stringify(v): return "('%s', '%s', %s, %s)" % (v[0], v[1], v[2], v[3]) #transform all to string v = map(stringify, row) #glue them together batchData = ", ".join(e for e in v) ... Add solution