DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
transform dictionary keys python
def rename_keys(d, trafo_dic): return dict([(trafo_dic.get(k), v) for k, v in d.items()])
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#transform
#dictionary
#keys
#python
ADD COMMENT
Topic
COMMENT
Name
1+2 =
Submit