Python program to print hello world
In this article, we will look into How to print “Hello World” in Python.
Method 1: Using Print()
Here we will be using the python print() function for the same. The print() function in python is used to print python objects as strings as standard output.
The python print function has the following syntax:
Where: String: This string will be “Hello world”
Method 2: Using sys
In this method we are going to print string using the sys module, sys module in Python provides various functions and variables that are used to manipulate different parts of the Python runtime environment. It allows operating on the interpreter as it provides access to the variables and functions that interact strongly with the interpreter.
sys.std.write() : stdout is used to display output directly to the screen console.