Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #37632 > unrolled thread
| Started by | Dave Angel <d@davea.name> |
|---|---|
| First post | 2013-01-24 16:08 -0500 |
| Last post | 2013-01-24 16:08 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Dict comp help Dave Angel <d@davea.name> - 2013-01-24 16:08 -0500
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2013-01-24 16:08 -0500 |
| Subject | Re: Dict comp help |
| Message-ID | <mailman.1015.1359061763.2939.python-list@python.org> |
On 01/24/2013 03:58 PM, Joseph L. Casale wrote:
> 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?
>
Not till you tell us what the pattern is supposed to be. I can see how
you might want xx:dd, yy:ee, zz:ff but have no idea what the intended
connection is between the source dicts and the result.
--
DaveA
Back to top | Article view | comp.lang.python
csiph-web