Skip to content

Instantly share code, notes, and snippets.

@jxcl
Created September 27, 2013 01:36
Show Gist options
  • Save jxcl/6723056 to your computer and use it in GitHub Desktop.
Save jxcl/6723056 to your computer and use it in GitHub Desktop.
fields_i_care_about = ["f1", "f2"]
new_dict = {}
for field in fields_i_care_about:
new_dict[field] = old_dict[feild]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment