with open('input.txt', 'r') as f:
    inputLines = f.readlines()
newLines = insert_before_back(inputLines, ['Hello\n', 'From\n', 'heinst\n'])
add_inventory(newLines, 'HadesKitty')
with open('output.txt', 'w') as f:
    for line in newLines:
        f.write(line)
Append at certain point in file, increment a value each time