In this article, we will show you, How to write a sample Python program to Print Hello World or any custom message. This is a basic, or a traditional program to start any programming language. It also help you to understand print in Python.
Sample Python Program to Print Hello World
This Sample Python program will print the hello world.
# Sample Python Program to Print Hello World print("Hello World")
Following print statement will print Hello World.
Sample Python Program to Print Custom Message
This sample python program allows the user to input their own message, and prints that message
# Sample Python Program to Print Message str = input("Welcome to Tutorial Gateway") print(str)