CS2613/labs/L15/list2dict.py

8 lines
154 B
Python

def list2dict(lst):
lst_dict = dict()
counter = 1
for i in range(lst):
lst_dict[counter] = i
counter += 1
return lst_dict