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


Groups > comp.lang.python > #37631

Dict comp help

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <jcasale@activenetwerx.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.103
X-Spam-Level *
X-Spam-Evidence '*H*': 0.80; '*S*': 0.01; 'subject:help': 0.07; 'dict': 0.09; 'slightly': 0.15; 'received:172.18.0': 0.16; 'to:name:python-list@python.org': 0.20; 'values': 0.26; 'thanks!': 0.26; 'anyone': 0.33; 'to:addr:python-list': 0.33; 'hi,': 0.33; 'list': 0.35; 'problem,': 0.35; 'similar': 0.35; 'list.': 0.35; 'but': 0.36; 'two': 0.37; 'to:addr:python.org': 0.39; 'build': 0.39; 'different': 0.63; 'received:unknown': 0.63; 'insight': 0.71; 'subject:comp': 0.96
X-Cloudmark-SP-Filtered true
X-Cloudmark-SP-Result v=1.1 cv=x4wvebh7U2otgv2g1Q/ELETKOrtBkVhBqv1eL6GwWag= c=1 sm=1 a=P90J6pEA2ccA:10 a=7PYXob_7ZXMA:10 a=BLceEmwcHowA:10 a=8nJEP1OIZ-IA:10 a=xqWC_Br6kY4A:10 a=oNw28mxuUhXRB3mVwYQ4Ag==:17 a=JcQIL8slu61CS5Zq0RIA:9 a=wPNLvfGTeEIA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117
From "Joseph L. Casale" <jcasale@activenetwerx.com>
To "python-list@python.org" <python-list@python.org>
Subject Dict comp help
Thread-Topic Dict comp help
Thread-Index AQHN+nSpzyWBdtr5P0a8ac9F4riuJg==
Date Thu, 24 Jan 2013 20:58:00 +0000
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-originating-ip [172.18.0.4]
Content-Type text/plain; charset="iso-8859-1"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1014.1359061153.2939.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1359061153 news.xs4all.nl 6918 [2001:888:2000:d::a6]:41827
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:37631

Show key headers only | View raw


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



Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web