python - 'too many values to unpack', iterating over a dict. key=>string, value=>list -


I get a lot of value for 'unpack' '' error Any ideas How can I fix this?

  first_names = ['foo', 'bar'] last_names = ['gravy', 'snowman'] field = {'first_names': first_names, potential_value in field: # error on this line You have to use something like that.    

For fields, possible fields in the field .ITItems (): print fields, possible_and

For more information see through the dictionaries again, such as items () < / Code>, in Python versions.

edit
Since Python 3 is perimeter ()

  fields, fields.items Possible_value (print) in () (field, possible_value)    

Comments