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