top of page

Comments used in Python

  • Writer: Jino Shaji
    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

Recent Posts

See All
Program to Create an investment report.

“””Program: investment.py Author: JINO SHAJI Compute an investment report. 1. The inputs are        starting investment amount       ...

 
 
 

Comments


bottom of page