single line and multiline comments in python code example
Example 1: multiline comment python
'''
inside a multi-line string!
Just wrap the comment in the three single quote marks,
And
you're
good
to
go!
'''
Example 2: how to add comment in python
Example 3: comment in python
"""
The recommended method for commenting multiple lines is using # on each line.
The (“””) method isn’t actually a comment but defines a Text constant
of the text between the (“””).
It isn’t displayed, but exists and could potentially cause unexpected errors.
"""
Example 4: python multiline comment
def increase_salary(sal,rating,percentage):
""" increase salary base on rating and percentage
rating 1 - 2 no increase
rating 3 - 4 increase 5%
rating 4 - 6 increase 10%
"""