Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #37431

Re: Any algorithm to preserve whitespaces?

References <CAE7MaQZyvwOvD6ggMDZ4+b=r1PsKuYX+VZThEpKvxBbfJJCK3g@mail.gmail.com> <50FAEE23.5030107@lightbird.net>
Date 2013-01-23 14:50 +0530
Subject Re: Any algorithm to preserve whitespaces?
From Santosh Kumar <sntshkmr60@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.874.1358932816.2939.python-list@python.org> (permalink)

Show all headers | View raw


I am in a problem.

    words = line.split(' ')

preserve whitespaces but the problem is it writes an additional line
after every line.


And:

    words = line.split()

works as I expect (does not adds addition line after every line) but
does not preserves whitespaces.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Any algorithm to preserve whitespaces? Santosh Kumar <sntshkmr60@gmail.com> - 2013-01-23 14:50 +0530

csiph-web