s=ascii(hexlify(urandom(10)))

G

gert

I expected that py3 did not converted the b'...' indication too ?

b'afc76815e3fc429fa9d7'
 
M

Martin v. Löwis

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.

Regards,
Martin
 
G

gert

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]
 
M

Martin v. Löwis

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]

And your question is?
 
P

Pierre-Alain Dorange

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?

The answer is probably 23.
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top