python strings
Sion Arrowsmith
siona at chiark.greenend.org.uk
Thu May 4 10:41:02 EDT 2006
Bryan <belred at gmail.com> wrote:
> >>> s = '\x00'
> >>> s[0] == chr(0)
>True
That's a little excessive when:
>>> s = '\0'
>>> s[0] == chr(0)
True
Oh, and to reassure the OP that that null really is *in* the string:
>>> len(s)
1
--
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
___ | "Frankly I have no feelings towards penguins one way or the other"
\X/ | -- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
More information about the Python-list
mailing list