Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

reverse keys and values in dictionary with zip python

my_dic={1:'one',2:'two',3:'three'}
dict(zip(my_dic.values(),my_dic.keys()))
 
PREVIOUS NEXT
Tagged: #reverse #keys #values #dictionary #zip #python
ADD COMMENT
Topic
Name
6+8 =