[Solved] Trying to select a random word from a website Python 3.6
[ad_1] A correct version of you code – the problem was that you were having a bytes object instead of the str you probably expected. I added a .decode(‘utf-8’) to the content read from the website, and now the html is an str object. You recieved the error because you were working on a bytes … Read more