Newby: how to transform text into lines of text

vsoler vicente.soler at gmail.com
Sun Jan 25 14:32:38 CET 2009


Hello,

I'va read a text file into variable "a"

     a=open('FicheroTexto.txt','r')
     a.read()

"a" contains all the lines of the text separated by '\n' characters.

Now, I want to work with each line separately, without the '\n'
character.

How can I get variable "b" as a list of such lines?

Thank you for your help



More information about the Python-list mailing list