Base64 encoding in Python 3,encoded = base64.b64encode('data to be encoded')