Published December 20, 20251 min read

How to print hello world in python

Learn Programming.

How to print hello world in python

To print "Hello, World!" in Python, you use the print() function.

The Code

print("Hello, World!")

Breakdown

  • print(...): This is the built-in function that outputs text to the screen/console.
  • "...": The quotation marks tell Python that the text inside is a string (a sequence of characters).

Alternative: Single Quotes

You can also use single quotes; the result is exactly the same:

print('Hello, World!')

Would you like to know how to save this as a file and run it on your computer?

You can also use single quotes; the result is exactly the same:

print('Hello, World!')

Would you like to know how to save this as a file and run it on your computer?

You can also use single quotes; the result is exactly the same:

print('Hello, World!')

Would you like to know how to save this as a file and run it on your computer?