Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'preserve': 0.09; 'preserves': 0.09; 'whitespaces': 0.09; 'cc:addr:python-list': 0.10; 'line)': 0.16; 'line.split()': 0.16; 'subject:whitespaces': 0.16; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'words': 0.29; 'writes': 0.30; 'expect': 0.31; 'problem.': 0.32; 'problem': 0.33; 'received:google.com': 0.34; 'adds': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'subject:Any': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=QfwHWq/KCidtPhi8EzCJmbVbE+3qBRijSTakEeo0qvo=; b=lCziiXEgTWcUUIjwX5HnHHHBYWIw8RR0Yh7w78ZM/mOEiZkhe0+P6kMwZxSCA5SOgV tgZsqiPf5SA1JvgSNvImSmX7jzlvEaTwfd2pnZmT4SNnUHP/ynrGwhvLXGx/br5ViY3f eEBmNgtELlbdaunqoA4p4NmoQ8WfFZ896AuYH/epEq1s9sBi7llCdAW3OntWAyFYg4on 3xsAq0WfXy5EQQuYw2HkLznLv5ZLJN4CJrZaFONXnZetQ8+Pa92Pq77yPc/QEaYclxJx PN2YgSOUv88IvvLIFtA5n2lN5iuVBekJU6OvVXV+cdkzDdJq9DbBR+lE0ve0YuaNAif1 ocmA== MIME-Version: 1.0 X-Received: by 10.60.24.161 with SMTP id v1mr402030oef.115.1358932812768; Wed, 23 Jan 2013 01:20:12 -0800 (PST) In-Reply-To: <50FAEE23.5030107@lightbird.net> References: <50FAEE23.5030107@lightbird.net> Date: Wed, 23 Jan 2013 14:50:12 +0530 Subject: Re: Any algorithm to preserve whitespaces? From: Santosh Kumar To: Mitya Sirenef Content-Type: text/plain; charset=UTF-8 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1358932816 news.xs4all.nl 6930 [2001:888:2000:d::a6]:49930 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:37431 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.