0

I have a byte-string e.g. b'foo\x00bar' which was serialized into a string-string with str() e.g. str(b'foo\x00bar') resulting in "b'foo\\x00bar'". How do I get the original byte-string?

So, given "b'foo\\x00bar'" how do I get b'foo\x00bar'?

martineau
  • 119,623
  • 25
  • 170
  • 301
Justas
  • 5,718
  • 2
  • 34
  • 36

0 Answers0