Python – Internet access:

In this tutorial, we will learn about how to access the internet using the python. In python, we will have a module called “urllib” that provides various Objects and functions to access the internet.

We can perform many activities using this “urllib” module like accessing the webpage data of any website, sending an email… etc.

Let us try fetching the 100 bytes of code behind the google.com page. Below is the example.

Example:

Output:

Let us try fetching the 500 bytes of code behind the google.com page.

Output: