fields = self.dictionary.keys() vals = self.dictionary.values() stmt = "UPDATE TABLE table_name SET %s = '%s'" %(.join(fields), .join(vals))"