Run
myList = ['a', 'b', 'c'] myDict = {myList[i]: i for i in range(0, len(myList), 1)} print(myDict)
Output