Given the python code
import base64
byte = base64.b64encode(b'hello')
byte has the value
b'aGVsbG8='
But I'm trying to get the string of the literal encoded bytes inside the b'...' notation.
Only solution I've found so far is to cast the bytes as string and get the substring of the value without the first two and last characters,
str(byte)[2:-1]
which gives me
'aGVsbG8='
While this works, it feels like a complete hack.
byte.decode("utf-8")python3.