Computer Science, asked by koka5radkatekousere, 1 year ago

How to do a multiline comment in python

Answers

Answered by WrathRaiser
0
technically you cant and have to put # on every line but you have a workaround which is to write is as a string:
'''
this is a
multi
line
comment
'''

triple ' or "
Answered by kunjika158
2

Answer:

Unlike other programming languages 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. This is the only way to get “true” source code comments that are removed by the Python parser.

Explanation:

Hope it helps you

Similar questions