On Mar 5, 12:13 pm, Benjamin Peterson <benja...@python.org> wrote: > Tino Wildenhain <tino <at> wildenhain.de> writes: > > > Rhodri James wrote: > > > for b in x: > > > print hex(ord(b)) > > > better: > > > print x.encode("hex") > > even better: > > import binascii > print binascii.hexlify(some_bytes)
AFAICT binascii.hexlify(some_bytes) gives the SAME result as some_bytes.encode("hex") for much more typing -- I see no "better" here. -- http://mail.python.org/mailman/listinfo/python-list