So you just started in python programming, and want to prank your Mates. Here I will teach you how to open any website on his computer using python.
Before you begin download and install python from Here
Step 1:
open notepad and type
import webbrowser
In python the "import" proclamation is utilized to add a module to your venture. For this situation we need to include the webbrowser module.
Step 2:
webbrowser.open('http://SITE HERE!.com')
Possible usages:
You can add as many websites as you want like show below
webbrowser.open('http://hackeyprince.blogspot.com')
webbrowser.open('http://google.com')
url = "http://hackeyprince.blogspot.com";
webbrowser.open(url)
import webbrowser
webbrowser.open('https://hackeyprince.blogspot.com')
webbrowser.open('http://google.com')
webbrowser.open('http://hackeyprince.cu.cc')
webbrowser.open('http://hackeyprince.wordpress.com')
Save the file as visus.py (.py is MUST)
Enjoy pranking your friends and if you wish to learn more programming then check out our article below.
# Top 6 Websites To Learn Computer Programming Languages
0 comments:
Post a Comment