Answers for "create dict of value to index from list python"

0

create dict of value to index from list python

>>> lst = ['A','B','C']
>>> {k: v for v, k in enumerate(lst)}
{'A': 0, 'C': 2, 'B': 1}
Posted by: Guest on March-16-2020

Code answers related to "create dict of value to index from list python"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language