M
mike7411
Is it possible for python strings to contain a zero byte?
Is it possible for python strings to contain a zero byte?
Is it possible for python strings to contain a zero byte?
s = "\x000"
s[0] == chr(0) True
Gerhard said:Python 2.4.2 (#2, Sep 30 2005, 21:19:01)
[GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.Trues = "\x000"
s[0] == chr(0)
- -- Gerhard
True>>> s = '\x001'
>>> s[0] == chr(0) True
>>> s = '\x00abc'
>>> s[0] == chr(0)
True>>> s = '\x00'
>>> s[0] == chr(0)
Bryan said:Trues = '\x00'
s[0] == chr(0)
Trues = '\0'
s[0] == chr(0)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.