A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-August/037857.html below:

[Python-Dev] Extending hex() and oct() to accept strings

[Python-Dev] Extending hex() and oct() to accept strings [Python-Dev] Extending hex() and oct() to accept stringsBob Halley halley at play-bow.org
Thu Aug 28 07:30:09 EDT 2003
Guido van Rossum <guido at python.org> writes:

> And I think that what you really wanted is probably closer to this:
> 
>   >>> import binascii
>   >>> binascii.hexlify('ABC')
>   '414243'
>   >>> 

Or

        >>> 'ABC'.encode('hex_codec')
        '414243'

        >>> '414243'.decode('hex_codec')
        'ABC'

/Bob

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4