Igor Korot <ikoro...@gmail.com> writes: > for (key,value) in my_dict: > #Do some stuff > > but I'm getting an error "Too many values to unpack".
Use for (key,value) in mydict.iteritems(): ... otherwise you loop through just the keys, whicn in your dictionary happens to be 3-tuples. So you try to unpack a 3-tuple to a 2-tuple and get a too-many-values error. -- https://mail.python.org/mailman/listinfo/python-list