Program Comments

Python Java
An end of line comment begins with the # symbol.

# This is an end of
# line comment
# (on three lines).

A multi-line comment, also called a docstring, begins with “”” and ends with “””.

“””
This is a docstring or
multi-line comment.
“””

An end of line comment begins with the // symbol.

// This is an end of
// line comment
// (on three lines).

A multi-line comment begins with /* and ends with */.

/*
This is a multi-line
comment.
*/

© Ken Lambert. All rights reserved.