mysql-python insert and list comprehension
<p>i'm reading data out of and odbc source, returning row objects, that are tuple-like.
i need to insert these tuples into a mysql table</p>

<p>so for every table (with different number of fields) now i do something like:</p>

<pre><code>c.execute("""INSERT INTO table1 (field1, field2, field3, field4)
            VALUES (%s, %s, %s, %s)""", 
            (row[0], row[1], row[2], row[3]))
</code></pre>

<p>i want to generalize the function and have a mapping in a dictionary
like {tupleindex:mysqlfield}</p>

<pre><code>table1 = {1: "field2", 2: "field2", 3: "field3", 4: "field4"}
</code></pre>

<p>how can i rewrite that insert using list comprehension?</p>
