Urllib Module Intro:  urllib is a URL handling module of Python.

urllib is a package that collects several modules for working with URLs:


To Access and print a URL’s content to the console Python using this urllib module.

urllib module Implementation:

At first we imported urllib.request for opening and reading the urls that we will be provided later. Then we take a variable called url and used a method called urlopen().Python uses this urlopen() method for accessing any url address like:http://www.facebook.com
After that we take another variable called data and assigned url.read().previously we got all the contents of “http://www.facebook.com” site in our url variable.And Now we called this variable with read() method.Python read()  method can access all the contents as a text from any sources. So in our data variable we have all the contents of google site as a text.Here we used the term content is used for actually html/css/js codes.That means our above code will access all the frontend codes of google site and will print on your Python console as a Output.