邮编列出了太多要解压的物品 - python

我有13个列表的压缩列表。我想将项目插入到mysql数据库中。这是我的代码:

zipped_list=zip(list1,list2...list13)
for a,b,c,d,e,f,g,h,i,j,k,l,m in zipped_list:
    cur.execute("INSERT INTO QB_global_sentiment(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) VALUES('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')" %("date","US_pos","US_neg","US_neu","UK_pos","UK_neg","UK_neu","CA_pos","CA_neg","CA_neu","AU_pos","AU_neg","AU_neu",str(m), str(a),str(b),str(c),str(d),str(e),str(f),str(g),str(h),str(i),str(j),str(k),str(l)))

这是我的错误:

    for a,b,c,d,e,f,g,h,i,j,k,l,m in zipped_list:
ValueError: too many values to unpack

我同意项目太多,而且确实很长。是否有更好的方法?

谢谢!

python大神给出的解决方案

听起来您有一个包含13个列表的列表,并且想要并行迭代。为此,可以使用zip(),如下面的简单示例所示:

In [8]: l = [[1, 2, 3], [4, 5, 6]]

In [9]: for a, b in zip(*l):
   ...:     print a, b
   ...:     
1 4
2 5
3 6