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
  • 112,593
  • 23
  • 157
  • 280
Justas
  • 5,268
  • 2
  • 31
  • 35

0 Answers0