Python First Program

In this tutorial, we will develop the Python Hello, World program.

Here’s a simple “Hello, World!” program in Python:

print("Hello, World!")

To run this program, follow these steps:

  1. Open a text editor (e.g., Notepad, Sublime Text, Visual Studio Code, etc.).
  2. Copy and paste the above code into the text editor.
  3. Save the file with a .py extension, for example, “hello_world.py”.
  4. Open your command-line interface (e.g., Command Prompt on Windows or Terminal on macOS/Linux).
  5. Navigate to the directory where you saved the “hello_world.py” file using the cd command (Change Directory).
  6. Run the Python script using the python a command followed by the script’s filename:
python hello_world.py

You should see the output:

Hello, World!

You may also like...