>> >>> import binascii >> >>> binascii.hexlify('ABC') >> '414243' >> >>> > > Or > > >>> 'ABC'.encode('hex_codec') > '414243' > > >>> '414243'.decode('hex_codec') > 'ABC' The only defense I can think to offer for the hex() and oct() idea is that I felt like there was something significant about the fact that it was the first thing I thought to try. It seemed like the "obvious" way to do it. While both of these solutions are quite readable now that I see them, I'm not sure that I'd call either of them obvious. However, I can certainly appreciate the cost of adding bells and whistles to the language, especially for something that would probably not see much use (as Guido pointed out). Thank you both for the tips. Matthew Barnes
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