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(&#39;file1&#39;, newline=&#39;&#39;),delimiter=&#39; &#39;)<br>
for a, b, c in f1:<br>   print(&#39;%s %s %s&#39; % (a, b, c))<br><br><div class="gmail_quote">2011/3/29 Peter Otten <span dir="ltr">&lt;__<a href="mailto:peter__@web.de">peter__@web.de</a>&gt;</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>
&gt; I have many text files, where data is delimited by space.<br>
&gt; Each file contain three colums: coordinate x, coordinate y and value for<br>
&gt; this location.<br>
&gt;<br>
&gt;      I would like to join this data to get one big file which will<br>
&gt; contain columns:<br>
&gt; coordinate x, coordinate y, value1,value2,..., value_n and save it to<br>
&gt; another text file.<br>
&gt;<br>
&gt; I wrote script, but there&#39;s some stupid error (like &quot;\n&quot; character<br>
&gt; although I have added .rstrip() command).<br>
&gt;<br>
&gt; Coul You tell me what is most convenient way to join this data<br>
&gt; (maybe by using csv module?)?<br>
<br>
</div>Please show us the code that you have. This proves that you&#39;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>