Answers for "how to comment in python"

6

comments in python

#this is commented
'''
this
is
also 
a 
comment
'''
Posted by: Guest on August-25-2020
1

python comments

# this is a single line comment, python ignores these
foo = "bar" # can be placed after code

"""
python doesnt have multiline comments
so multiline strings do the tricks

this works because python ignores string literals that arentassigned to a varaible
"""

# comments can be used as notes for the dude editing the script
Posted by: Guest on May-03-2021
7

comment in python

# This is a one line comment

"""
This is a comment for multiple lines,
as you can see
"""

""" But also this is valid """
Posted by: Guest on October-05-2020
0

how to make a comment in python

#Single Line Comments!
"""
multiline
comments
!
"""
Posted by: Guest on October-25-2021
1

python comments

# Numpy-style python comments for functions
def foo(param_1=True):
  """Example function.

    Parameters
    ----------
    param_1 : bool, optional
        The first parameter (default is True)

    Returns
    -------
    num
        a number
    """
  return -1
Posted by: Guest on April-30-2021
34

python comments

#A single line comment, also known as an end of line comment.

"""This is a longer 
  multiline comment.
"""
Posted by: Guest on November-12-2021

Code answers related to "how to comment in python"

Python Answers by Framework

Browse Popular Code Answers by Language