[Tutor] how to join two text files ?

Peter Otten __peter__ at web.de
Tue Mar 29 10:45:21 CEST 2011

Mateusz K wrote:

> I have many text files, where data is delimited by space.
> Each file contain three colums: coordinate x, coordinate y and value for
> this location.
>      I would like to join this data to get one big file which will
> contain columns:
> coordinate x, coordinate y, value1,value2,..., value_n and save it to
> another text file.
> I wrote script, but there's some stupid error (like "\n" character
> although I have added .rstrip() command).
> Coul You tell me what is most convenient way to join this data
> (maybe by using csv module?)?

Please show us the code that you have. This proves that you've put some 
effort into the matter and allows us to focus on the missing parts.

More information about the Tutor mailing list