My objective or output I'm looking for is to append to input txt file the first part of all lines of existing input file. As an example:

```
Input:
line_item1 string1
line_item2 string2
line_item3 string3

Output:
line_item1 string1
line_item2 string2
line_item3 string3
line_item1   # append
line_item2   # append
line_item3   # append

```

The code I have created does not output anything:

```
portionA = []
with open('output outfile.txt', "a+") as f:
    for line in f.readlines():
        parts = line.strip().split("\t", 1)
        portionA = parts[0]
        portionB = parts[1]
        portionA.append(line)
        f.write('{}\n'.format(''.join(portionA)))   

```