CS2613/labs/L15/list2dict.py

8 lines
154 B
Python
Raw Normal View History

2022-11-02 10:02:15 -03:00
def list2dict(lst):
lst_dict = dict()
counter = 1
for i in range(lst):
lst_dict[counter] = i
counter += 1
return lst_dict