data = ['Yes', 'No']
with open('in.txt') as f:
    with NamedTemporaryFile('w', dir='.', delete=False) as temp:
        for arg, line in zip(data, f):
            temp.write(line.rstrip() + ' {}\n'.format(arg))
move(temp.name, 'in.txt')
Append each line in file