whitespace and ?asc()?
Dan Bishop
danb_83 at yahoo.com
Wed Jul 2 22:41:58 EDT 2003
Steven Taschuk <staschuk at telusplanet.net> wrote in message news:<mailman.1057116904.17052.python-list at python.org>...
[snip]
> Note also that at the interpreter prompt you can (some of) those
> ASCII codes in hex just by looking at the value of the string:
>
> $ python
> ...
> >>> import string
> >>> string.whitespace
> '\t\n\x0b\x0c\r '
>
> If your ASCII chart doesn't have hex, continue with
>
> >>> 0x0b, 0x0c
> (11, 12)
>
> to obtain the decimal values.
FYI,
'\x0b' == '\v' (vertical tab)
'\x0c' == '\f' (form feed)
More information about the Python-list
mailing list