Program to print Hello World in Python

Program to print Hello World in Python

In this python programs guide, we will learn to write:

  • basic hello world program in python

Hello world in python

Lets write a program to print hello world in python. The code to print hello world in python is as follows:


print("Hello World")

The output is :


PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python
Hello World

Please check our video tutorial on hello world in python program:


Few important points on hello world in python

  • In Python, unlike C, C++ we don't require any header file for basic programming. So directly we can code.
  • In Python, primarily it is not mandetory to have a main() method, as we have in C, C++ and Java. But still you can create a main method by specifying " if __name__ == "__main__": ".
  • To run a Python program in a text editor like VS Code or Sublime Text, open the terminal and write python followed by the name of the program and hit enter. Your code will execute.

write a program to print hello world in python


Basic Python Programs

Would you like to see your article here on tutorialsinhand. Join Write4Us program by

About the Author
Devjeet Roy
Full Stack Web Developer & Blockchain Enthusiast
Page Views :    Published Date : Oct 20,2022  
Please Share this page

Related Articles

Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!