DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
filter dict with certain keys
>>> obj = { "a":1, "b":{"c":2,"d":3}} >>> only(obj,["a","b.c"]) {'a': 1, 'b': {'c': 2}}
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#filter
#dict
#keys
ADD COMMENT
Topic
COMMENT
Name
2+8 =
Submit