Best Answer · By JanBask Python Expert
Answered on Feb 1, 2021
Instead of your code you can use the below-mentioned code to get rid of import error:-
from urllib.request import urlopen
html = urlopen("http://www.google.com/").read()
print(html)
Was this helpful?