Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #37631 > unrolled thread

Dict comp help

Started by"Joseph L. Casale" <jcasale@activenetwerx.com>
First post2013-01-24 20:58 +0000
Last post2013-01-24 20:58 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Dict comp help "Joseph L. Casale" <jcasale@activenetwerx.com> - 2013-01-24 20:58 +0000

#37631 — Dict comp help

From"Joseph L. Casale" <jcasale@activenetwerx.com>
Date2013-01-24 20:58 +0000
SubjectDict comp help
Message-ID<mailman.1014.1359061153.2939.python-list@python.org>
Hi,
Slightly different take on an old problem, I have a list of dicts, I need to build one dict
from this based on two values from each dict in the list. Each of the dicts in the list have
similar key names, but values of course differ.


[{'a': 'xx', 'b': 'yy', 'c': 'zz'},  {'a': 'dd', 'b': 'ee', 'c': 'ff'}]


{ 'xx': 'zz', 'dd': 'ff'}


Anyone have insight on how to pull this off?


Thanks!
jlc



[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web