How to Run Python Hello World: Simple Step-by-Step Guide

Logan Jul 13, 2026

Launching your programming journey with a classic "Hello, World!" project is an exciting moment. Especially when you're exploring Python, a user-friendly and powerful language, this simple yet impactful starting point sets the tone for the scenic route ahead. So, let's embark on this adventure and create our first Python hello world program.

How to Run a Python Script
How to Run a Python Script

If you're a beginner, chances are, you're learning Python in a controlled environment like a local Python installation or a cloud-based coding platform. Whether it's IDLE, Pycharm, or Jupyter Notebook, these tools provide an interactive interface to run and test your Python code. So, let's start by creating a new Python file and writing our first lines of code.

an image of a computer screen with the words'$ 10, world'highlighted
an image of a computer screen with the words'$ 10, world'highlighted

The Basic 'Hello, World!' Program

The fundamental idea behindHello, World! in any language is to print a greeting message on the screen. In Python, we achieve this with a simple print function. Let's break down the code step by step.

PYTHON BASICS: HELLO, WORLD!
PYTHON BASICS: HELLO, WORLD!

Using print() Function

The print() function in Python is used to output text as a message on the console. In our case, we want to display 'Hello, World!'. Here's how you do it:

How To Run A Python Script
How To Run A Python Script

```python print('Hello, World!') ```

Before we jump into how to run this code, let's explore another way you might see 'Hello, World!' programs written.

Assigning to a Variable

Another way to achieve the same result is by assigning the message to a variable and then printing it. This technique can help you understand the concept of variables in Python. Here's how you can do it:

30-Day Python Learning Plan for Beginners | Complete Python Roadmap to Learn Coding Fast
30-Day Python Learning Plan for Beginners | Complete Python Roadmap to Learn Coding Fast

```python greeting = 'Hello, World!' print(greeting) ```

Both of these methods will produce the same output: 'Hello, World!' But they show different ways to handle greeting messages. Now that we understand how to write a 'Hello, World!' program, let's dive into running it on your Python environment.

Running Python 'Hello, World!' Code

depending on your coding environment, the steps to run your code may vary slightly. Here, I'll provide instructions for three common environments:

Python Kivy Projects
Python Kivy Projects

IDLE

IDLE is a simple GUI for running Python code. Here are the steps:

Python Tutorial
Python Tutorial
Python Beginner? Here's How To Up Your Game
Python Beginner? Here's How To Up Your Game
| Pythonista Planet
| Pythonista Planet
How to Learn Python for Free
How to Learn Python for Free
Python Hello World program | python tutorial for freshers and experienced #python| Harisystems
Python Hello World program | python tutorial for freshers and experienced #python| Harisystems
How to use while loops in Python
How to use while loops in Python
Shortcut to learn Python.[Cheatsheet]
Shortcut to learn Python.[Cheatsheet]
Python Projects Ideas For Beginners
Python Projects Ideas For Beginners
Learn Python the Right Way in 5 Steps
Learn Python the Right Way in 5 Steps
the top 10 python projects you must know in 2055 infographical poster with text
the top 10 python projects you must know in 2055 infographical poster with text
Free Python Learning Path for Beginners in 2025
Free Python Learning Path for Beginners in 2025
| Pythonista Planet
| Pythonista Planet
Text-Based Adventure Game in Python (Complete Guide)
Text-Based Adventure Game in Python (Complete Guide)
Python for Beginners: 8 Critical Mistakes to AVOID! 🐍🛑
Python for Beginners: 8 Critical Mistakes to AVOID! 🐍🛑
How Long Does It Take To Learn Python
How Long Does It Take To Learn Python
learn python
learn python
How to Check the Version of Python
How to Check the Version of Python
Pythonistaで"Hello World"を実行する
Pythonistaで"Hello World"を実行する
  1. Open IDLE and create a new file.
  2. Paste your code (either print('Hello, World!') or greeting = 'Hello, World!'
    print(greeting)).
  3. Press F5 to run the code or select Run > Run Module from the menu.

Your message should be displayed in the console.

Pycharm

Pycharm is a popular IDE with advanced features for Python development. Follow these steps:

  1. Open Pycharm and create a new file (Click on File > New > Python File).
  2. Paste your code into the file.
  3. Right-click in the editor and select Run 'file_name' (replace 'file_name' with your file's name).

The output should appear in Pycharm's terminal.

Jupyter Notebook

Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Here's how:

  1. Open Jupyter Notebook and click on New > Python 3.
  2. Paste your code into a cell.
  3. Click on the cell to select it, then press Shift + Enter to run it.

Your message should display below the cell.

Congratulations! You've just run your first Python program. By now, you should be familiar with the basic 'Hello, World!' program and understand how to launch it depending on your development environment. Now, let your creativity run wild, and start exploring more complex Python concepts.