Python program to print Hello World
In this example, we will learn about the first step of Python programming, i.e. printing “Hello World” on the screen. Before continuing with the hello world program, please do visit our beginner tutorial for getting started with Python.
You can display Hello World in two ways in Python.
Go to terminal and type python and hit enter
Now type the following code:-
You will get the output as below:-
Open your favorite text editor and save the file as hello.py with the code
Now go to the terminal, switch to the directory where you saved the file and type
You should get a similar output as above.