Newbie question about file input

Peter Hansen peter at engcorp.com
Wed Aug 18 21:02:07 EDT 2004


Aaron Deskins wrote:
> Thanks for the info. I wasn't aware that "\n" is whitespace. I'm still a 
> programming beginner and learning everyday! Any other whitespace 
> characters I should know about?

c:\>python
 >>> import string
 >>> string.whitespace
'\t\n\x0b\x0c\r '
 >>> len(string.whitespace)
6

That's ASCII TAB, LF, VT, FF, CR, and SPACE.

-Peter



More information about the Python-list mailing list