G
gert
I expected that py3 did not converted the b'...' indication too ?
b'afc76815e3fc429fa9d7'
b'afc76815e3fc429fa9d7'
b'afc76815e3fc429fa9d7'
You mean, just because you invoked the ascii() builtin, the b
prefix should disappear? Re-read the documentation of the
ascii() builtin - it probably does something completely different
from what you expect it to do.
gert said:You mean, just because you invoked the ascii() builtin, the b
prefix should disappear? Re-read the documentation of the
ascii() builtin - it probably does something completely different
from what you expect it to do.
s = str(hexlify(urandom(8)))[2:18]
s = str(hexlify(urandom(8)))[2:18]
And your question is?
Martin v. Löwis said:I expected that py3 did not converted the b'...' indication too ?
b'afc76815e3fc429fa9d7'
You mean, just because you invoked the ascii() builtin, the b
prefix should disappear? Re-read the documentation of the
ascii() builtin - it probably does something completely different
from what you expect it to do.
s = str(hexlify(urandom(8)))[2:18]
And your question is?
No question just solution to get rit of b''
s = str(hexlify(urandom(8)))[2:18]
And your question is?No question just solution to get rit of b''
Ah. hexlify(urandom(8)).decode('ascii')
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.