Create and Run the Hello World Program in Python
Python programs can be written in a very easy manner, follow the below two steps to create and run the program.
1. Open a text editor, write the following "Hello World" program and save the file with .py extension i.e. HelloWorld.py
Hello World Program - HelloWorld.py
class HelloWorld:
def __init__(self):
pass
def printMessage(self):
print("Hello World")
obj = HelloWorld()
obj.printMessage()
2. Run the python file (i.e. python program) using the command python HelloWorld.py.