Last active
November 24, 2025 19:57
-
-
Save DuaneR5280/7edd7c73a380bf5026fefecd22c4d779 to your computer and use it in GitHub Desktop.
Compare python dicts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user_profile_a = { | |
| "user_id": 4095, | |
| "username": "dev_alex", | |
| "role": "maintainer", | |
| "is_active": True, | |
| "notifications_enabled": False | |
| } | |
| user_profile_b = { | |
| "user_id": 4095, | |
| "username": "dev_alex_v2", | |
| "role": "admin", | |
| "is_active": True, | |
| "last_login": "2023-10-27" | |
| } | |
| seta = set(user_profile_a.items()) | |
| setb = set(user_profile_b.items()) | |
| results = seta ^ setb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment