Web browser

Note: These python functions wont work on this online compiler. Please try these commands on your python IDE.

Web browser is a module which lets the coders open urls through python. To import this module, we use the following command:

import webbrowser 

Open links

We can open websites through this command:

webbrowser.open(url)

Open new tabs

We can open new tabs through python. To use this, we use the following command:

webbrowser.open_new_tab(url)