I have a dictionary as a global variable and a list of string:
GLOBAL = {"first": "Won't change", "second": ""}
words = ["a", "test"]
[{"first": "Won't change", "second": "a"}, {"first": "Won't change", "second": "test"}]
result_list = []
for word in words:
dictionary_to_add = GLOBAL.copy()
dictionary_to_add["second"] = word
result_list.append(dictionary_to_add)
Pretty sure you can do this in one ugly line. Assuming you use immutables as values, otherwise you'd have to do a deep copy which is also possible:
[GLOBAL.copy().update(second=w) for w in word]
Or even better (Python 3 only)
[{**GLOBAL, "second": w} for w in word]