def get_dict_list(x_list):
the_dict = {'x': 1, 'y': 2, 'z': 3}
del the_dict['x']
n = 0
while n<len(x_list):
the_dict[x_list[n]]=1
the_new_list=[].append[the_dict]
del the_dict[x_list[n]]
n=n+1
print(the_dict)
网友评论