Hi I am very new to programing and coding but I think I am doing pretty good for only a month so far. I have hit a little snag and ran into a problem I do not know how to solve. I have two separate text files that I am taking numbers from and averaging them together and putting the average in a new file. The two text files are zztext.txt & zztext2.txt. There is not the number list like 1), 2), 3), 4), or 5) in the files I did it two show what is on what line number.

This is what is in the zztext.txt:

1. P3
2. 591 600
3. 255
4. 1 4 3
5. 4 5 6

This is what is in the zztext2.txt:

1. P3
2. 591 600
3. 255
4. 6 5 4
5. 4 2 6

```
import os
a = 0
#progarm1-program4 needs name changes
def program1():
    print(os.getcwd())

    inFile = open('zztext.txt','r')
    for i in range(3):
        next (inFile)
    inFile2 = open('zztext2.txt','r')
    for i in range(3):
        next (inFile2)

    for line in inFile:
        first1 = line.split()
        print(first1)
        print(first1[a])

    print('\n')

    for line in inFile2:
        first2 = line.split()
        print(first2)
        print(first2[a])

    #change [number] to go across
    w = int(first1[a]) + int(first2[a])
    print(w)

```

result =
['**1**', '**4**', '3'] This returns 1

['4', '5', '6'] This returns 4

['**6**', '**5**', '4'] This returns 6

['4', '2', '6'] This returns 4 and the final return is 8 because the 4 and 4 from both lists were added together.

I want the bold 1 and 6 added together and the bold 4 and 5 added together and both put in a new file so it would look like:

1. P3
2. 591 600
3. 255
4. 7(1 and 6 added) 9(4 and 5 added) and 7(3 and 4 added)
and then the next row of numbers
5. 8(4+4) 7(5+2) 12(6+6)
and so on. Any help would be greatly appreciated! :)