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: 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" To: "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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 Hi,=0A= Slightly different take on an old problem, I have a list of dicts, I need t= o build one dict=0A= from this based on two values from each dict in the list. Each of the dicts= in the list have=0A= similar key names, but values of course differ.=0A= =0A= =0A= [{'a': 'xx',=A0'b': 'yy',=A0'c': 'zz'}, =A0{'a': 'dd',=A0'b': 'ee',=A0'c': = 'ff'}]=0A= =0A= =0A= { 'xx': 'zz', 'dd': 'ff'}=0A= =0A= =0A= Anyone have insight on how to pull this off?=0A= =0A= =0A= Thanks!=0A= jlc=0A= =0A= =0A= =0A=