2018-11-03

2018-11-03  本文已影响0人  smallcatmeat
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)
上一篇 下一篇

猜你喜欢

热点阅读