Unicode and Python - how often do you index strings?

Paul Rubin no.email at nospam.invalid
Thu Jun 5 14:16:28 EDT 2014


Johannes Bauer <dfnsonfsduifb at gmx.de> writes:
> line = line[:-1]
> Which truncates the trailing "\n" of a textfile line.

use line.rstrip() for that.



More information about the Python-list mailing list