Stripping new lines from strings?
Andreas Jung
andreas at andreas-jung.com
Tue Aug 15 07:36:58 EDT 2000
CHRIS <unk at unk.ororr> wrote:
2qyFrom what I understand of Python file I/O, there is no guarantee that
2qyreturned lines all contain new lines characters so, it may clip the last
2qyline's ending character. And even then, if it is used on a Windows file,
2qyit would skip the '\r' character.
Ok - it's a hack :-) but it works perfectly when you are only
working with files under Unix - not the best solution but
properly the fastest.
Andreas
More information about the Python-list
mailing list