how to make multiline comment in python code example
Example 1: multiline comment python
# Python doesn't support multi-line comment blocks out of the box.
# The recommended way to comment out multiple lines of code in Python is
# to use consecutive single-line comments.
# feelsbadman
Example 2: python multiline comment
#%% There are not multiline comments in python,
# this # is the only form of commenting but, people use
# """triple quotes""" for multiline commenting but this
# is actually a String the interpreter will read and
# will ocupy memory. If you dont put this kind of string
# into a variable it will be collected on execution
Example 3: 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%
"""
Example 4: python multi comment
"""Put comments inside triple quotes"""
Example 5: comment all selected lines in python
Select relevant lines to be commented, then use ctrl+/