I have written a lot of code in Python2. Not as much in Python3.
One thing I used Python for a lot is to quickly convert string values into base64...
For further actions, you may consider blocking this person and/or reporting abuse
Luckily you can type byte string literals in Python3:
base64.b64encode(b'test')
That should make it as neat and simple as in Python2!
Even better than mine! Good catch.