comment block of code python code example
Example 1: 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 2: comment out a block in python
select the lines you want to comment
and 'use Ctrl + / to comment all of the selected text'.
To uncomment do the same thing.
OR
put a '#' before each line
eg : #This is a comment
Example 3: python comment block
"""
this
is
a multiline
comment
"""
Example 4: comment sections of code python
For editing in VSCode, highlight code block, then: Edit>>Toggle Line Comment