Run YouTube with python.How to open YouTube with python programming

In these days python is most popular programming language,we can create  anything with it with little bit of coding because of python have so many module to access the classes and methods.
Python offers us ease to code with pre-built libraries so it is easy to work with python.

Python program to access website's

In python we can create a script which can access the web browser 
and open the provided url.it is easy to code the script we will create it within only 3 steps.

Step 1:

Import the web browser  module.It is an inbuilt module comes with  python at its installation time.The webbrowser module is a convenient web browser controller in the Python programming language. This module offers a high-level interface that enables showing the documents based on the web.









Step 2:

In step 2 we will add an input box in which you will enter the url of the website which you want to open.First of all we will create a variable named query  to enter the url of the website.







Step 3:

In it we will use the open method along with the web browser module the syntax is shown below in the image  in which the webbrowser is module and open() is the method. So below is the image of the example of code












Extra: 

In the image shown in step three you can see the while loop which 
Will always repeat the loop and will not terminate the script.I did it so every time you don't have to run script.The while loop will return the script so you can run code how many you want to open the url 
And if you want to breake the flow use if conditional statement with the break jumping statement

From author 

Bye bye see you all next time and stay connected with this blog if you want to know my interesting short blog about the programing 
tutorial,Because coding is fun if it is nicely done.