def list_to_dict(a_list):
 new_dict = {}
 for (i, v) in enumerate(a_list):
  new_dict[i] = v
 return new_dict

def list_to_dict ( a_list ) : new_dict = { } for ( i , v ) in enumerate ( a_list ) : new_dict [ i ] = v return new_dict
convert a list to a dictionary .