Throughout my script I create a fairly long list that then I need to insert into my database. I want to know if there's a way to direct create a SQL statement with the contents of the array instead of overdoing something like:
cursor.execute(
'''INSERT INTO
my_table
VALUES (%s, %s, %s, %s, %s, /* 'til almost infinity */);''',
(list[0], list[1], list[3]... /* again almost until infinity */))