How to Open Multiple Websites at once using Python
Hello everybody, and welcome to Red Lizzrd. Today, in this tutorial, we are going to show you How to Open Multiple Websites at once using Python script.
You can open 100 or even 1000 websites at once in your web browser using this Python script. For this purpose, we have to make use of some Python Module. A module is a Python object with arbitrarily named attributes that you can bind and reference. Simply, a module is a file consisting of Python code. A module can define functions, classes and variables. A module can also include runnable code.
Here is the Code:
# First import a module named 'webbrowser'
import webbrowser
webbrowser.open('http://geekboy.co')
webbrowser.open('http://hacoder.com')
webbrowser.open('http://facebook.com')
webbrowser.open('http://twitter.com')
webbrowser.open('http://google.com')
webbrowser.open('http://gmail.com')
# Keep adding URLs
Save it as RedLizzrd.py or with any other name which you want to. Then run this Python script, and all the websites will open in your default Web Browser automatically. You can add as many URLs as you want.
Any questions, comments or suggestions are welcomed.