whitespace and ?asc()?

Erik Max Francis max at alcyone.com
Wed Jul 2 03:48:15 CEST 2003


Ray Tomes wrote:

> I was trying to find out the exact definition of whitespace so I went
> to
> look at strings.whitespace to find out which chars were whitespace,
> and
> found 9, 10, 11, 12, 13, 32 which according to my ancient ascii chart
> are
> TAB, LF, VT, NP, CR, SPACE. Anyone know what NP = 12 is?

ASCII 12 decimal is FF, or form feed.  NP is not an official control
character in ASCII, and TAB and SPACE are written HT (horizontal tab)
and SP, respectively.

	http://www.alcyone.com/max/reference/compsci/ascii.html

> Also, in trying to find the ASCII (or is it ANSI) values ...

It's ASCII.

> ... for
> characters I
> could not find the reverse function for chr() [in BASIC it is asc()]-
> can
> someone please tell me what reverses chr()?

ord.

>>> ord('\n')
10
>>> chr(10)
'\n'

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ People are taught to be racists.
\__/  Jose Abad




More information about the Python-list mailing list