Quick Question
Alexis Roda
arv.nntp at gmail.com
Thu Jun 22 16:03:12 EDT 2006
En/na xkenneth ha escrit:
> I want to be able to cycle through an array and print something in
> hexadecimal. Such as this
> thisArray = ["AF","0F","5F"]
> for x in range(len(thisArray)):
> print "\x" + thisArray[x]
>
> However python chokes on the escaped identifier, how can I get around
> this?
What's the expected output?
\xAF
\x=F
\x5F ?
for x in thisArray :
print "\\x" + x
HTH
More information about the Python-list
mailing list