number base conversion? (ASCII to Hex)

chibaA at TinterlogD.Tcom chibaA at TinterlogD.Tcom
Fri May 12 01:26:43 CEST 2000


That's exactly it.  Very much appreciated!

kc


On Thu, 11 May 2000 16:12:02 -0700, emile at fenx.com wrote:

>Something like this?
>
>>>> for i in "Testing 1,2,3 ":
>	print "%2x" % ord(i),
>
>54 65 73 74 69 6e 67 20 31 2c 32 2c 33 20
>
>Emile van Sebille
>emile at fenx.com
>
>
><chibaA at TinterlogD.Tcom> wrote in message
>news:<391b2bd5.66612734 at news1.on.sympatico.ca>...
>> How would I go about getting the base-16(hex) value of a character,
>> into a string?
>> 
>> take character word[1] (for example)
>> and retrieve the hex value of 31
>> and assign it to value hexValue in an ascii format (ie. as the number
>> 31).
>> 
>> 
>> 
>> -- 
>> http://www.python.org/mailman/listinfo/python-list
>>
>




More information about the Python-list mailing list