When I try to loop trough items in json and some of them doesn't contain element which I am evoking I am getting Key Error.
for i in range(200000): #(amount of lines in file):
data["tasks"][i]["Assignments"] = [data["tasks"][i]["Assignments"][0]]
KeyError: 'Assignments'
How can I avoid this error?