(Jan-04-2017, 08:16 AM)wavic Wrote:As you can't rely on the order of the dict, this is not guaranteed to give the desired result.for i, k in enumerate(dic.keys()): dic[k] = dic[k] + ls[i]
You would need to sort the keys to guarantee behavior with this method.
Honestly if you want to add values from a sequence where the values correspond to keys it would make more sense if both were dicts.