If you need read files like Example file_1 and file_2 you could use csv reader, look this code and think how you could use it:<br><br>import csv<br><br>f1 = csv.reader(open('file1', newline=''),delimiter=' ')<br>
for a, b, c in f1:<br> print('%s %s %s' % (a, b, c))<br><br><div class="gmail_quote">2011/3/29 Peter Otten <span dir="ltr"><__<a href="mailto:peter__@web.de">peter__@web.de</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Mateusz K wrote:<br>
<br>
> I have many text files, where data is delimited by space.<br>
> Each file contain three colums: coordinate x, coordinate y and value for<br>
> this location.<br>
><br>
> I would like to join this data to get one big file which will<br>
> contain columns:<br>
> coordinate x, coordinate y, value1,value2,..., value_n and save it to<br>
> another text file.<br>
><br>
> I wrote script, but there's some stupid error (like "\n" character<br>
> although I have added .rstrip() command).<br>
><br>
> Coul You tell me what is most convenient way to join this data<br>
> (maybe by using csv module?)?<br>
<br>
</div>Please show us the code that you have. This proves that you've put some<br>
effort into the matter and allows us to focus on the missing parts.<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</div></div></blockquote></div><br>