Created
October 8, 2015 15:00
-
-
Save LouisBurke/6b73c0ac770136dafe17 to your computer and use it in GitHub Desktop.
This file contains 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
bad_dict = { | |
'good_key': '1', | |
'bad_key': '2' | |
} | |
good_dict = {key: val for key, val in bad_dict.items() if 'bad_key' not in key} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment