Removing the continous newline characters from the pythong string
Basilisk96
basilisk96 at gmail.com
Tue May 1 17:50:33 EDT 2007
why not use split:
>>>s = " a\n\n\n\n\n\n\n\n\nsss\n\n\n\n\n\n\n\n\n\n\nvvvv\n\n\n\nvsa\n\n\n\nasf... \n\nafs"
>>>s.split()
['a', 'sss', 'vvvv', 'vsa', 'asf...', 'afs']
More information about the Python-list
mailing list