import base64
def base64(text):
newText = base64.b64encode(text.encode())
return newText
This is function the main calls with input, gets string and returns the encoded string. I keep on getting the following error-
AttributeError: 'function' object has no attribute 'b64encode'
I have tried string or bytes as parameter but the error stays the same.
import base64(no space)?