Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
how to make a dictionary of indices and lists python
Nate Bonifant
Programming language:
Python
2021-07-02 04:09:10
0
Q:
how to make a dictionary of indices and lists python
Krebto
Code:
Python
2021-09-19 14:17:10
>>> lst = ['A','B','C'] >>> {k: v for v, k in enumerate(lst)} {'A': 0, 'C': 2, 'B': 1}
0
Tags
indice
python
list
make
how
dict
Related
get all keys from python dictionary in a list
how to subtract 2 lists in python
python initialize list length n
python get dictionary keys as list
get all indices of a value in list python
create a list of a certain length python
python create a list of alphabets
python get dict values as list
create dict of value to index from list python
python create a dictionary of integers
python list length
python set and dictionary comprehensions
list length in python
python dictionary with list
list len python
create dictionary comprehension python
python 3 how to set a dictionary from two lists
create dictionary python from two lists
New to Communities?
Join the community