Comments

In Python, the # token starts a comment. The rest of the line is ignored.

Here is a new version of Hello, World!.


 
1
#---------------------------------------------------
2
# This demo program shows off how elegant Python is!
3
# Written by Joe Soap, December 2010.
4
# Anyone may freely copy or modify this program.
5
#---------------------------------------------------
6
7
print("Hello, World!")     # Isn't this easy!
8


(ch01_3)

Note

This workspace is provided for your convenience. You can use this activecode window to try out anything you like.


3
 
1
2
3


(scratch_01)

Next Section - Values and Data Types