Re: Any algorithm to preserve whitespaces?

Discussion in 'Python' started by Santosh Kumar, Jan 23, 2013.

  1. 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.
     
    Santosh Kumar, Jan 23, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Santosh Kumar

    Any algorithm to preserve whitespaces?

    Santosh Kumar, Jan 19, 2013, in forum: Python
    Replies:
    0
    Views:
    143
    Santosh Kumar
    Jan 19, 2013
  2. Lie Ryan
    Replies:
    0
    Views:
    147
    Lie Ryan
    Jan 19, 2013
  3. Mitya Sirenef

    Re: Any algorithm to preserve whitespaces?

    Mitya Sirenef, Jan 19, 2013, in forum: Python
    Replies:
    0
    Views:
    144
    Mitya Sirenef
    Jan 19, 2013
  4. Peter Otten
    Replies:
    0
    Views:
    106
    Peter Otten
    Jan 23, 2013
  5. Dave Angel
    Replies:
    0
    Views:
    106
    Dave Angel
    Jan 23, 2013
Loading...

Share This Page