<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-06-05 13:42 GMT-05:00 Johannes Bauer <span dir="ltr"><<a href="mailto:dfnsonfsduifb@gmx.de" target="_blank">dfnsonfsduifb@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On 05.06.2014 20:16, Paul Rubin wrote:<br>
> Johannes Bauer <<a href="mailto:dfnsonfsduifb@gmx.de">dfnsonfsduifb@gmx.de</a>> writes:<br>
>> line = line[:-1]<br>
>> Which truncates the trailing "\n" of a textfile line.<br>
><br>
> use line.rstrip() for that.<br>
<br>
</div>rstrip has different functionality than what I'm doing.</blockquote><div><br></div><div>How so? I was using line=line[:-1] for removing the trailing newline, and just replaced it with rstrip('\n'). What are you doing differently?</div>
</div></div></div>