Hello, World!


Python is a very simple language, and has a very straightforward syntax. It encourages programmers to program without boilerplate (prepared) code. The simplest directive in Python is the "print" directive - it simply prints out a line.

To print a string in Python, just write:

print("This line will be printed.")

Exercise

Use the "print" function to print the line "Hello, World!".

print("Goodbye, World!") print("Hello, World!") test_output_contains("Hello, World!") success_msg('Great job!')
Next Tutorial
Copyright © learnpython.org and LeineLab e.V.. Read our Terms of Use.