Hello, World!

Print
The most basic statement that you are going to learn straight away is the print statement. In the most recent version of Python (Python 3), it is a function and so must be followed by parentheses. The print statement will take whatever is within the parentheses and output it into the python shell.

To print a string in Python 3, you will need to write:

print("Hello, World!")

This will result in a string being output to the shell with the words Hello, World!

Indentation
If you would like to place a print statement within certain blocks you may be required to use indentations. These are identified as 4 spaces into the line but using tab works just as well. For example, this would be used in code such as:

x = 10

if x == 10:

# Indented 4 spaces in

print("x is equal to 10")

Practise!
Now try to use the "print" command in your own Python scripts! Try to print the line "Hello, World!""This is the end of the first lesson, you should have an understanding on the print command and should be able to use it with ease now. Head to the next page for more knowledge."