Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Delete common entries between two dictionaries
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Derrick 'dman' Hudson, post: 1739467"] This would be great for sets, if a set adequately models your data. (with two sets, this would simply be (s1-(s1&s2))) Did you want to define equality by key or by (key, value) pair? for key in domains_white.keys() : if key in domains_black: del domains_black[key] for key in domains_white.keys() : if key in domains_black and domains_white[key] == domains_black[key] : del domains_black[key] -D -- He who scorns instruction will pay for it, but he who respects a command is rewarded. Proverbs 13:13 www: [URL]http://dman13.dyndns.org/~dman/[/URL] jabber: [email]dman@dman13.dyndns.org[/email] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Delete common entries between two dictionaries
Top