Comments used in Python
- Jino Shaji
- Jan 7, 2015
- 1 min read
Updated: Jun 9, 2020
•Start comments with # – the rest of line is ignored.
•Can include a “documentation string” as the first line of any new function or class that you define.
•The development environment, debugger, and other tools use it: it’s good style to include one.
def my_function(x, y):
“““This is the docstring. This
function does blah blah blah.”””
# The code would go here…
Comments