writer.writerow(['Subject', 'itemID', 'bias1Answer'])
for line in f:
    if ':' in line:
        value = line.split()[-1]
if 'Subject:' in line:
    subject = value
elif 'itemID:' in line:
    itemID = value
elif 'bias1Answer:' in line:
    bias1Answer = value
writer.writerow([subject, itemID, bias1Answer])
Разбор файла txt в словарь для записи в файл csv