"convert" string to bytes without changing data (encoding)

Peter Daum gator at cs.tu-berlin.de
Wed Mar 28 04:56:20 EDT 2012


Hi,

is there any way to convert a string to bytes without
interpreting the data in any way? Something like:

s='abcde'
b=bytes(s, "unchanged")

Regards,
                              Peter



More information about the Python-list mailing list