Re: update a list element using an element in another list

2017-01-31 Thread Rhodri James
On 31/01/17 11:28, Daiyue Weng wrote: Hi, I am trying to update a list of dictionaries using another list of dictionaries correspondingly. In that, for example, # the list of dicts that need to be updated dicts_1 = [{'dict_1': '1'}, {'dict_2': '2'}, {'dict_3': '3'}] # dict used to update

Re: update a list element using an element in another list

2017-01-31 Thread Jussi Piitulainen
Daiyue Weng writes: > Hi, I am trying to update a list of dictionaries using another list of > dictionaries correspondingly. In that, for example, > > # the list of dicts that need to be updated > dicts_1 = [{'dict_1': '1'}, {'dict_2': '2'}, {'dict_3': '3'}] > > # dict used to update dicts_1 >

update a list element using an element in another list

2017-01-31 Thread Daiyue Weng
Hi, I am trying to update a list of dictionaries using another list of dictionaries correspondingly. In that, for example, # the list of dicts that need to be updated dicts_1 = [{'dict_1': '1'}, {'dict_2': '2'}, {'dict_3': '3'}] # dict used to update dicts_1 update_dicts = [{'dict_1': '1_1'},