I am using Python 3.x and have a string that contains utf-8 characters, like this:
link='https%3A%2F%2Fwww.google.com'
I would now like to convert the string to ascii, so that it reads 'https://www.google.com'. How can I achieve this? I have tried
link.decode('utf-8')
which throws the exception:
AttributeError: 'str' object has no attribute 'decode'
Is there not an easy way to simply decode a string containing utf-8 characters to plain ascii characters?