hex notation funtion

Grant Edwards grante at visi.com
Tue Jan 18 20:18:17 CET 2005


On 2005-01-18, tertius <terti at mighty.co.za> wrote:

> Is there a builtin function that will enable me to display the hex 
> notation of a given binary string? (example below)

' '.join('%02x' % ord(b) for b in s)

-- 
Grant Edwards                   grante             Yow!  This is a NO-FRILLS
                                  at               flight -- hold th' CANADIAN
                               visi.com            BACON!!



More information about the Python-list mailing list