Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Dict comp help

Thread Tools

Dict comp help

Joseph L. Casale
Posts: n/a
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 dictsin 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?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
comp.lang.python,, comp.arch.embedded, comp.programming, comp.text.txt Python 1 10-23-2006 02:47 AM,,comp.lang.python,comp.os.magic-cap, . Python 0 06-19-2004 08:23 AM
misc.survivalism,comp.text.xml,,,comp.os.linux.development.system . XML 0 06-19-2004 08:15 AM
comp.lang.c++,comp.dcom.fax,comp.mail.misc,,comp.sys.amiga.networking . C++ 0 06-19-2004 07:54 AM,,,comp.databases.paradox, . Cisco 0 06-19-2004 07:48 AM