import base64
base64.b64encode(b'bytes required')
>>>b'Ynl0ZXMgcmVxdWlyZWQ='
If I understand correctly, base64 is a bytes <----> string notation. Then why doesn't it give me string 'Ynl0ZXMgcmVxdWlyZWQ='
directly?
Or does it expect me to do some decoding furthermore?
Like b'Ynl0ZXMgcmVxdWlyZWQ='.decode('ascii')
or
b'Ynl0ZXMgcmVxdWlyZWQ='.decode('utf-8')
? But they result in the same thing.