[EMAIL PROTECTED] wrote: > Also, it may be easier to use string interpolation, as in: > > return "INSERT INTO statecode (state, name) VALUES ('%(state)s', > '%(name)s')" % insert_dict > > ...after all necessary escaping, of course. >
Excuse me!? "statecode" needs to come from the first argument. Likewise the words "state" and "name" are *variables*. The OP has a gazillion other tables to process -- are you suggesting he should type in a gazillion different hard-coded return statements when he's already on the right track and just needs a bit of help with dict.keys() and dict.values()? -- http://mail.python.org/mailman/listinfo/python-list