[Tutor] Reading from a file
robert frank brenart
rfbrenar@cs.uchicago.edu
Fri, 17 Aug 2001 13:55:41 -0500 (CDT)
And we have a winner... thanks a bunch.
-Rob
>
> The \0 part means that that character is being displayed in its octal
> format. 012 is '\n' or NL. What OS created the files and what OS
> are you reading them on? You could strip that character off the
> string before you split it.
>
>
> for line in file.xreadlines() :
> line = line.strip()
> print line.split( "," )
>
> HTH,
> -D
>
>
> _______________________________________________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>