Python Foundations · Lesson 1 of 12Getting started with Python
print(), comments and running a script. Learn through short examples, practical tasks and targeted questions.
← All lessons
Printing messages and comments
The print() function sends information to the console, which is useful for giving feedback and checking that a program reaches a particular line. A comment starts with # and is ignored when the program runs. Try changing the quoted message, then add a second print statement to see the output appear on separate lines.
Watch out: A frequent beginner mistake is to forget quotation marks around text. Python treats unquoted words as names of variables, not messages.
A free TutorSyntax programming lesson. About our teaching approach.