I want to encode the string "tamilnadu" and the output is like "dGFtaWxuYWR1"
str = "tamilnadu";
print str.encode('base64','strict') //dGFtaWxuYWR1
But when I am encode the string its shows an error like this
'base64' is not a text encoding; use codecs.encode() to handle arbitrary codecs
I tired all the encoding techniques, but the output for the sting is not like this encode value "dGFtaWxuYWR1"
How can I encode the string in python 3.4