Question: I have an `input` file where first column values are same and other column values are different.
i want to sum the values of `third` column only(first row to first row...) and want to keep the added values just beside of common first column values.

input

```
> > > >
1.000 3 0.002
2.010 4 -0.001
3.020 5 -0.001
> > > >
1.000 5 0.003
2.010 6 0.005
3.020 6 0.002

```

expected output

```
1.000 0.005
2.010 0.004
3.020 0.001

```

My script

```
import numpy as np
data=np.load("input.txt", allow_pickle=True)
summ=np.sum(data[:,2])

```

Error: Failed to interpret file 'input' as a pickle. Additionally any numpy based solution will be highly appreciated.Thanks.

Answer: 
```
a_file = open("file1.txt", "r")
number_of_lines = 2
with open("file2.txt", "w") as new_file:
    for i in range(number_of_lines):
        line = a_file.readline()
        new_file.write(line)
a_file.close()

```

I'm sure there is a neater solution out there somewhere but this will work!
Hope it helps you :)
```
f1=open("file1.txt","r")
f2=open("file2.txt","w")
fcontent=f1.readline()
f2.write(fcontent)
fcontent=f1.readline()
f2.write(fcontent)
f1.close()
f2.close()

```